NGINX - - problems with 404 when I call domain/auth etc.


New Member
Hello dear nginx experts,

I have set up a domain "" on my server!

When I call "" everything runs perfectly!
However, when I call "" I get a 404 error!

My configuration in "sites-available" is like this:

server {
listen 80;
listen [::]:80;

root /var/www/;
index index.html index.htm index.nginx-debian.html;


location / {
try_files $uri $uri/ =404;

listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


What do I need to put there so that the following calls don't return a 404 error:


Thanks in advance for your help.
Best regards


Well-Known Member
... you should put content into your webroot which can process the requests or configure your server to send the requests to the intended backend.


New Member
The cause was in the nginx configuration for the domain:

location / {
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.html;

"try_files $uri $uri/ =404;" was wrong!