Refactor and order nginx configs
This commit is contained in:
parent
5615a26075
commit
cc40e77821
5 changed files with 33 additions and 34 deletions
33
nginx/sites-available/count.ayaya.beauty.conf
Executable file
33
nginx/sites-available/count.ayaya.beauty.conf
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
server {
|
||||||
|
access_log /var/log/nginx/count.ayaya.beauty.log combined;
|
||||||
|
|
||||||
|
server_name count.ayaya.beauty;
|
||||||
|
include configs/general.conf;
|
||||||
|
include configs/securityheaders.conf;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://127.0.0.1:41000/;
|
||||||
|
include configs/proxyheaders.conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
# QUIC
|
||||||
|
add_header Alt-Svc 'h3=":443"; ma=86400';
|
||||||
|
|
||||||
|
listen 443 http3;
|
||||||
|
listen 443 http2 ssl; # managed by Certbot
|
||||||
|
ssl_certificate /etc/letsencrypt/live/count.ayaya.beauty/fullchain.pem; # managed by Certbot
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/count.ayaya.beauty/privkey.pem; # managed by Certbot
|
||||||
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||||
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
if ($host = count.ayaya.beauty) {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
} # managed by Certbot
|
||||||
|
|
||||||
|
server_name count.ayaya.beauty;
|
||||||
|
|
||||||
|
listen 80;
|
||||||
|
return 404; # managed by Certbot
|
||||||
|
}
|
|
@ -1,33 +0,0 @@
|
||||||
server {
|
|
||||||
access_log /var/log/nginx/count.ayaya.beauty.log combined;
|
|
||||||
|
|
||||||
server_name count.ayaya.beauty;
|
|
||||||
include configs/general.conf;
|
|
||||||
include configs/securityheaders.conf;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass http://127.0.0.1:41000/;
|
|
||||||
include configs/proxyheaders.conf;
|
|
||||||
}
|
|
||||||
|
|
||||||
# QUIC
|
|
||||||
add_header Alt-Svc 'h3=":443"; ma=86400';
|
|
||||||
|
|
||||||
listen 443 http3;
|
|
||||||
listen 443 http2 ssl; # managed by Certbot
|
|
||||||
ssl_certificate /etc/letsencrypt/live/count.ayaya.beauty/fullchain.pem; # managed by Certbot
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/count.ayaya.beauty/privkey.pem; # managed by Certbot
|
|
||||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
||||||
|
|
||||||
}
|
|
||||||
server {
|
|
||||||
if ($host = count.ayaya.beauty) {
|
|
||||||
return 301 https://$host$request_uri;
|
|
||||||
} # managed by Certbot
|
|
||||||
|
|
||||||
server_name count.ayaya.beauty;
|
|
||||||
|
|
||||||
listen 80;
|
|
||||||
return 404; # managed by Certbot
|
|
||||||
}
|
|
|
@ -50,7 +50,6 @@ server {
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
Loading…
Add table
Reference in a new issue