add some nginx configs
This commit is contained in:
parent
2b6fc73d26
commit
530010110e
2 changed files with 35 additions and 0 deletions
14
nginx-minimal-proxy-config
Normal file
14
nginx-minimal-proxy-config
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# the point of this template is to work cleanly with certbot
|
||||||
|
# set up your proxied service, create nginx config with this template,
|
||||||
|
# then run certbot and the resultant config should work correctly
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name your_domain;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass app_server_address;
|
||||||
|
include proxy_params;
|
||||||
|
}
|
||||||
|
}
|
21
nginx-minimal-static-site-config
Normal file
21
nginx-minimal-static-site-config
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue