diff options
| author | Arseney300 <Arseney300@gmail.com> | 2026-02-20 01:35:32 +0700 |
|---|---|---|
| committer | Arseney300 <Arseney300@gmail.com> | 2026-02-20 01:35:32 +0700 |
| commit | 42a11c0b06a997eefb5f4d10fae2ab215aaff40a (patch) | |
| tree | a649e6debc0ffd63c39f9ed1d0deedc80d5923f5 /nginx | |
| parent | c39cbabc5b31bfd845437679827bec861d80953e (diff) | |
Fix nginx.conf: add Ghost reverse proxy, fix SSL config
- Fix server_name from swave.com to swave.lol on SSL block
- Add blog.swave.lol as additional server_name
- Update SSL protocols to TLSv1.2 and TLSv1.3 only (remove deprecated TLSv1/1.1)
- Use modern cipher suite
- Add reverse proxy location block to forward requests to Ghost (ghost:2368)
- Add proper proxy headers (Host, X-Real-IP, X-Forwarded-For, X-Forwarded-Proto)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'nginx')
| -rw-r--r-- | nginx/nginx.conf | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 9e49ae7..9767a66 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -4,7 +4,7 @@ server { listen 80; listen [::]:80; - server_name swave.lol; + server_name swave.lol blog.swave.lol; location / { rewrite ^ https://$host$request_uri? permanent; @@ -21,7 +21,7 @@ server { listen 443 ssl http2; listen [::]:443 ssl http2; - server_name swave.com; + server_name swave.lol blog.swave.lol; server_tokens off; @@ -32,10 +32,10 @@ server { ssl_dhparam /etc/ssl/certs/dhparam-2048.pem; - ssl_protocols TLSv1.2 TLSv1.1 TLSv1; + ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; - ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_ecdh_curve secp384r1; ssl_session_tickets off; @@ -45,8 +45,15 @@ server { ssl_stapling_verify on; resolver 8.8.8.8; - - # Define the specified charset to the “Content-Type” response header field + # Define the specified charset to the "Content-Type" response header field charset utf-8; -} + # Reverse proxy to Ghost + location / { + proxy_pass http://ghost:2368; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} |
