Everything worked as it should, but after I ran the script for installing the ssl certificate I could no longer access the webGUI (the web page is just blank white).
The logs told me that the databse user in config.php had changed and access were denied. I changed the username back to what I entered at the initial installation, but I still can’t access the webGUI and I see no errors in the logs.
I got no errors while running the scripts. Only error I’ve seen was the one about access denied to maria DB. That message stopped when I changed the username in config.php.
Running the diff gave this (substituted mydomain):
I have a single file in /etc/letsencrypt/live called mydomain.
When accessing the server in my browser, it says that the connection is secure and verified by letsencrypt.
I put the code in at the top of index.php and when I accessed the server I saw a bunch of info.
EDIT: I think I found the problem. The name of the databse was also changed in config.php. Mydomain didn’t exist as a database, so I changed it back to the name of my database and now it seems to work.
Thanks a bunch for teaching me this new awsome tool (diff) !
yes. of course. @riegerCLOUD replaces every appearance of $YOURSERVERNAME with $DYNDNSNAME
so if you name your database “$YOURSERVERNAME=nextcloud” that will be replaced as well.
sudo -u www-data sed -in 's/'$YOURSERVERNAME'/'$DYNDNSNAME'/' /var/www/nextcloud/config/config.php
That seems a bit backwards. Is it standard procedure to name the database the same as the servername? I mean, there might be more databases hosted on the same machine.
p.s.: neither carstens shell script nor my ansible playbook are indent to run on a server where are already other services installed. you can do this but you have to know exactly how you server is configured before and what the scripts are doing. e.g. both install and configure a web server (nginx) without checking if there is running web server.
No, fortunetly the password was not affected, haha. Made sure at installation to put in a strong password. Only the user named “nextcloud” changed.
However, the password is stored in plain text in config.php, is that really ok?