Please use this template for troubleshooting questions.
My issue: 404s when hosting a static site generator (Quartz - https://quartz.jzhao.xyz) with certbot
How I encountered the problem: I started throwing everything into nginx.conf and then certbot happened.
Solutions I’ve tried: asked the certbot forum
Version of NGINX or NGINX adjacent software (e.g. NGINX Gateway Fabric): 1.30.4
Deployment environment:Ubuntu
Minimal NGINX config to reproduce your issue (preferably running on NGINX Playground | tech-playground.com for ease of debugging, and if not as a code block): nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful # configuration file /etc/nginx/nginx.conf: user nginx; worker_processes auto; error_log /var/log/nginx/error.log notice; pid /run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; gzip on; include /etc/nginx/conf.d/*.conf; server { listen 443 ssl; server_name ``biosene.us``; if ($host = ``biosene.us``) { return 301 https://$host$request_uri; } root /home/easyvps/ourtown/public; index index.html; error_page 404 /404.html; location / { try_files $uri $uri.html{ # proxy_pass ``http://127.0.0.1``; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location~ .php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /.ht { # deny all; #} } # configuration file /etc/letsencrypt/options-ssl-nginx.conf: # This file contains important security parameters. If you modify this file # manually, Certbot will be unable to automatically provide future security # updates. Instead, Certbot will print and log an error message with a path to # the up-to-date file that you will need to refer to when manually updating # this file. Contents are based on ``https://ssl-config.mozilla.org``
NGINX access/error log: (Tip → You can usually find the logs in the /var/log/nginx directory.) - snippet from error.log
2026/09/12 00:20:37 [error] 29686#29686: *7 open() "/usr/share/nginx/html/containers/json" failed (2: No such file or directory), client: 186.182.105.49, server: localhost, request: "GET /containers/json HTTP/1.1", host: "64.68.206.158:80"
2026/09/12 00:25:28 [error] 29686#29686: *10 open() "/usr/share/nginx/html/SDK/webLanguage" failed (2: No such file or directory), client: 195.182.16.23, server: localhost, request: "GET /SDK/webLanguage HTTP/1.1", host: "64.68.206.158:80"