After backup restore of Nextcloud instance, getting 502 Bad Gateway
Had to do a restore (from the Linode utility) of a server running Nextcloud that came from the Marketplace. Nextcloud was reachable before the restore but not after and now getting 502 bad gateway error.
This setup is using multiple Docker containers that talk to each other. The apache container has this in it's logs….
apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/000-default.conf: Permission denied
Anyone have any clues or ideas of what may have happened and how to correct it?
Based on that message, it seems like something in your website/docker configs got messed up when you restored from the backup. Apache is attempting to enable the
000-default.conf website file when it should be enabling the
I suggest attempting to get the Nextcloud site to start using the following command:
docker exec -u 0 -it nextcloud-aio-apache a2ensite nextcloud && service apache2 reload
This will connect to the Apache Docker container as
root, enable the Nextcloud site, and reload the Apache service on the container.
During this process, your Nextcloud instance may tell you to stop the container with the following command:
sudo docker start nextcloud-aio-apache
In which case you may need your original password to log back into the application - the one that is several different words.
Hopefully this helps!