Nextcloud not working after restart; Apache error

I have a stable channel release of NC13 running in a snap package (nextcloud-snap) on Ubuntu 16.04. I’ve been running this for a little while now. Recently I restarted the computer. I have the same IP address as I did before the restart. I have reenabled and restarted the NC service ( $ sudo snap restart nextcloud ) and $ sudo snap services nextcloud says everything is up and running ok. However, I cannot connect to the server. Even localhost does NOT work.

This is the output of $ sudo snap logs nextcloud : https://pastebin.com/NVe0R8wh

I believe the issue lies in the lines:

4. 2018-10-05T22:16:50Z nextcloud.apache[19470]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

5. 2018-10-05T22:16:50Z nextcloud.apache[19470]: httpd (no pid file) not running

I tried going to https://127.0.1.1 instead of https://localhost and I was greeted with the default Apache landing page. Any ideas on how to get my server back?

have the same issue - restarted nextcloud (after a crash…) and the services all check out to be working - but when going to port 80 i am greeted with the standard apache landing page as if the apache settings have been wiped.

damn snap installations… easy for the first second but then a headache down the road…

have you managed to solve it? would appreciate some guidance! :slight_smile:

I have the same exact issue. Did you manage to solve this issue?

Configure the “Servername” in /etc/apache2/sites-enabled/… - files.

Thanks @devnull for the reply. I am using the snap version of NC. Is it possible to set that in snap?

Sorry I do not use and like Snap. If you can not change it, i think it would not nessesary. Search the error in combination with Snap.

Is apache2 and the configuration /etc/apache2/sites-enabled a part of Snap?

Yes they are a part of snap. However, as far as I understood, you cannot change configs in /etc/apache2/sites-enabled but there is another config file which you can set some configs.
For example, I set trusted domains like this:

sudo nextcloud.occ config:system:set trusted_domains 2 --value=nextcloud.mydomain.dmn

but there isn’t anything directly related to “Servername”

Do you use a world wide ip address and Lets Encrypt?

Have you edit

/var/snap/nextcloud/current/nextcloud/config/config.php

see your posted link?

Ok, solved the issue. The problem was related to the IP address of my nextcloud server. It seems the IP was changed and my router was not able to report the changes to DDNS service! So I updated the IP in the DDNS and eveything worked fine again.