34 lines
986 B
Plaintext
34 lines
986 B
Plaintext
server {
|
|
listen 80;
|
|
server_name proselitigant.tech;
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name proselitigant.tech;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/proselitigant.tech/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/proselitigant.tech/privkey.pem;
|
|
include /etc/nginx/ssl.conf;
|
|
|
|
# Security headers
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
add_header X-Content-Type-Options nosniff;
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
location / {
|
|
proxy_pass http://web:3000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_cache_bypass $http_upgrade;
|
|
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;
|
|
}
|
|
}
|