404s when attempting to deploy a static site generator (Quartz)(certbot)

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"

Hi there,

I’m afraid that it’s quite unclear to me, from the description, what issue you are seeing.

I think it is: you had an nginx config that worked for serving files from the filesystem; and then certbot was used for something, and now your nginx config does not work for serving files from the filesystem.

Does that match what you intended to describe?

If so – do you have (or can you re-create) the nginx config from before certbot was involved?

Alternatively: what specific things can I do, after a fresh install of nginx, to see the successes and failures that you are seeing?

The error.log fragment mentions directory names that don’t seem to appear in the nginx config fragment, so it might be the case that some other config files are being used?

It may be that the description is already clear to someone else who will be able to provide guidance; but I suspect that if you can provide more detail, it will be easier for others to help.

Thanks,