From: Shane Jaroch Date: Tue, 28 Jun 2022 18:13:41 +0000 (-0400) Subject: update default to match working config in prod X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=a68becaa5bae03be03a12d0f90ad87994a1a5128;p=nutratech%2Fvps-root.git update default to match working config in prod --- diff --git a/etc/nginx/sites-available/default b/etc/nginx/sites-available/default index 8677353..1cc2851 100644 --- a/etc/nginx/sites-available/default +++ b/etc/nginx/sites-available/default @@ -17,7 +17,26 @@ server { try_files $uri @sanic; } + # Ghost + root /var/www/blog/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh) + + location ^~ /blog/ { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $http_host; + proxy_pass http://127.0.0.1:2368; + proxy_redirect off; + } + + location ~ /.well-known { + allow all; + } + + client_max_body_size 50m; + + # Sanic location @sanic { proxy_pass http://$server_name; # Allow fast streaming HTTP/1.1 pipes (keep-alive, unbuffered) @@ -34,7 +53,7 @@ server { # default favicon location = /favicon.ico { - alias /var/www/ntserv/static/favicon.gif; + alias /var/www/favicon.gif; } @@ -50,12 +69,16 @@ server { # https://wordpress.org/support/article/nginx/ # http://wiki.nginx.org/IfIsEvil server { - if ($host = deveast.linode.poczatek.dev) { - return 301 https://$host$request_uri; - } # managed by Certbot + + # CertBot + if ($host = deveast.linode.poczatek.dev) { + return 301 https://$host$request_uri; + } # managed by Certbot server_name deveast.linode.poczatek.dev; + + # CertBot listen 80; return 404; # managed by Certbot }