From dd6d5f3210391929596fdaeaa53992d161ca3047 Mon Sep 17 00:00:00 2001 From: koalasat Date: Wed, 12 Feb 2025 21:28:35 +0100 Subject: [PATCH] Add unsafe --- nginx/conf/nginx.conf | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/nginx/conf/nginx.conf b/nginx/conf/nginx.conf index 3b6bfa3..add8571 100644 --- a/nginx/conf/nginx.conf +++ b/nginx/conf/nginx.conf @@ -28,6 +28,22 @@ server { } } +server { + listen 80; + listen [::]:80; + + server_name unsafe.robosats.org; + server_tokens off; + + location /.well-known/acme-challenge { + root /var/www/certbot; + } + + location / { + return 301 https://unsafe.robosats.org$request_uri; + } +} + server { listen 443 ssl; listen [::]:443 ssl; @@ -69,3 +85,24 @@ server { proxy_set_header Connection "upgrade"; } } + +server { + listen 443 ssl; + listen [::]:443 ssl; + http2 on; + + server_name unsafe.robosats.org; + + ssl_certificate /etc/nginx/ssl/live/unsafe.robosats.org/fullchain.pem; + ssl_certificate_key /etc/nginx/ssl/live/unsafe.robosats.org/privkey.pem; + + location / { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_pass http://127.0.0.1:8080; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +}