Unable to access nextcloud web interface after fully installed

Hello, I am facing a problem after I installed nextcloud via snap and created admin account.

The problem is, I cannot access Nextcloud interface via my domain. The domain points to the sevrer and all services based on it worked fine.

My server have apache and nginx both installed, nginx listens to 80 and 443, while apache listens to 81 and 8080(SSL). I deployed nextcloud by “snap install nextcloud”, and proceeded manual-install. Now, accessing port 81 and 8080 only gets responded by apache2 of a server file list, while 80 and 443 gets responded by nginx of my own site.

Do you have any idea how to access the web interface? I appreciate if you can suggest it to me :face_with_head_bandage:

Notice: Accessing [example.com]:443(80)/nextcloud gets 404 Not Found, while [example.com]:(81)8080/nextcloud gets error ERR_SSL_PROTOCOL_ERROR

1 Like

Hi @Coop

The Nextcloud Snap package does contain it’s own web server, which per default listens on port 80. If you have already nginx listen on port 80 it cannot work. Change either the port of nginx or the port of the the Snap. If you change the port of the Snap package you could then use nginx (or Apache) in a ReverseProxy configuration in front of the Snap package. Note that the web server with which you want set up the SSL connection via Let’s Encrypt and proxy the requests to the Snap must listen on port 80 and 443.

https://github.com/nextcloud-snap/nextcloud-snap#httphttps-port-configuration.

https://github.com/nextcloud-snap/nextcloud-snap/wiki/Putting-the-snap-behind-a-reverse-proxy

Or maybe even better, try not to use that many web servers on one server and just let the Snap package handle everything for you… :wink:

1 Like

Hello @bb77,
Thanks for your suggestion!
I disabled nginx and apache2 in order to make this snap program work. Though, unfortunately it doesn’t seem to be working. The response was that, “connection closed”, which seemed like no server is listening on port 80.
I ran “snap services nextcloud” to check out the status of this application. It appears to be all active(except for Logrotate and nextcloud-fixer). I wonder if you have any more ideas about how to make it work.

Regrads,
Coop

What does sudo ss -ltnp say?

…and how are you trying to access it? Try entering the full URL including the port number in your browser like this:

http://ip-address:80

Also, systemctl disable apache2 does not stop the service. You either have to stop it with systemctl stop apache2 or reboot the machine after you disabled the service.

Other than that I can’t think of anything else right now…

I executed ss -lntp on my VPS, and found 80 port is actually listened by httpd. Here is the output of related process:

LISTEN 0 128 *:80 : users:((“httpd”,pid=8228,fd=4),(“httpd”,pid=5090,fd=4),(“httpd”,pid=5089,fd=4), (“httpd”,pid=5088,fd=4),(“httpd”,pid=5086,fd=4))

And of course I understand that I should reboot VPS if I only disable the service. I can confirm that either apache2 and nginx is not running now.

Thanks to your direction, I made it! The web interafce was accessible via IP_Address:[Port]. Though, I still wonder the reason why I cannot access it by my domain. The AAAA record points directly to my IP. Thanks again for your help!

1 Like

Hello @bb77,
Thanks for your suggestion!
I disabled nginx and apache2 in order to make this snap program work. Though, unfortunately it doesn’t seem to be working. The response was that, “connection closed”, which seemed like no server is listening on port 80.
I ran “snap services nextcloud” to check out the status of this application. It appears to be all active(except for Logrotate and nextcloud-fixer). I wonder if you have any more ideas about how to make it work.

Regrads,
Coop

So a fresh reboot solved this. Thanks to all your efforts @bb77!