blips/nginx-minimal-static-site-config

22 lines
625 B
Text
Raw Normal View History

2024-03-11 00:54:58 +00:00
# the point of this template is to work cleanly with certbot
# make a static site, create nginx config with this template,
# then run certbot and the resultant config should work correctly
#
# the cache-control entry is almost definitely something you want
# it is not saying "do not cache", explanation here:
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
server {
listen 80;
root /var/www/your_domain;
index index.html;
server_name your_domain;
location / {
add_header Cache-Control 'no-cache';
try_files $uri $uri/ =404;
}
}