From cc40e77821aa75489c0fc704b14c18da60c94fc4 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sat, 3 Dec 2022 02:03:40 -0300 Subject: [PATCH] Refactor and order nginx configs --- nginx/sites-available/count.ayaya.beauty.conf | 33 +++++++++++++++++++ nginx/sites-available/counter.conf | 33 ------------------- .../{searxng.conf => search.zzls.xyz.conf} | 1 - .../{counter.conf => count.ayaya.beauty.conf} | 0 .../{searxng.conf => search.zzls.xyz.conf} | 0 5 files changed, 33 insertions(+), 34 deletions(-) create mode 100755 nginx/sites-available/count.ayaya.beauty.conf delete mode 100755 nginx/sites-available/counter.conf rename nginx/sites-available/{searxng.conf => search.zzls.xyz.conf} (99%) rename nginx/sites-enabled/{counter.conf => count.ayaya.beauty.conf} (100%) rename nginx/sites-enabled/{searxng.conf => search.zzls.xyz.conf} (100%) diff --git a/nginx/sites-available/count.ayaya.beauty.conf b/nginx/sites-available/count.ayaya.beauty.conf new file mode 100755 index 0000000..7b636be --- /dev/null +++ b/nginx/sites-available/count.ayaya.beauty.conf @@ -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 + } diff --git a/nginx/sites-available/counter.conf b/nginx/sites-available/counter.conf deleted file mode 100755 index d5e6325..0000000 --- a/nginx/sites-available/counter.conf +++ /dev/null @@ -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 -} diff --git a/nginx/sites-available/searxng.conf b/nginx/sites-available/search.zzls.xyz.conf similarity index 99% rename from nginx/sites-available/searxng.conf rename to nginx/sites-available/search.zzls.xyz.conf index 7ed7fbb..722c210 100755 --- a/nginx/sites-available/searxng.conf +++ b/nginx/sites-available/search.zzls.xyz.conf @@ -50,7 +50,6 @@ server { ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot - } server { diff --git a/nginx/sites-enabled/counter.conf b/nginx/sites-enabled/count.ayaya.beauty.conf similarity index 100% rename from nginx/sites-enabled/counter.conf rename to nginx/sites-enabled/count.ayaya.beauty.conf diff --git a/nginx/sites-enabled/searxng.conf b/nginx/sites-enabled/search.zzls.xyz.conf similarity index 100% rename from nginx/sites-enabled/searxng.conf rename to nginx/sites-enabled/search.zzls.xyz.conf