I'm trying to set up a default page and a Nextcloud with a custom domain for my network with Nginx. I can access the default page successfully by typing the server's IP but I get the "This site can't be reached" message for Nextcloud.

This is my /etc/hosts file content localhost homeserver.nextcloud.com nextcloud.com

Content of /etc/nginx/sites-available/nextcloud.conf

server {
listen 80;
root /var/www/nextcloud;
server_name homeserver.nextcloud.com nextcloud.com;
index index.php index.html; }

I created the symlink with sudo ln -s /etc/nginx/sites-available/nextcloud.conf /etc/nginx/sites-enabled/

/var/www/nextcloud's owner is www-data

Restarted Nginx and rebooted the server, also using Chrome private navigation to avoid problems with browser cache. What am I doing wrong? Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.