Last active
October 27, 2024 03:40
-
-
Save dsebastien/456829327602ca6a48ac1bbbcb974863 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name ws.<YOUR_DOMAIN>; | |
server_tokens off; | |
# FORGE SSL (DO NOT REMOVE!) | |
ssl_certificate /etc/nginx/ssl/<YOUR_DOMAIN>/<certificate id>/server.crt; | |
ssl_certificate_key /etc/nginx/ssl/<YOUR_DOMAIN>/<certificate id>/server.key; | |
ssl_protocols TLSv1.2 TLSv1.3; | |
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES25> ssl_prefer_server_ciphers off; | |
ssl_dhparam /etc/nginx/dhparams.pem; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-XSS-Protection "1; mode=block"; | |
add_header X-Content-Type-Options "nosniff"; | |
charset utf-8; | |
# FORGE CONFIG (DO NOT REMOVE!) | |
include forge-conf/<YOUR DOMAIN>/server/*; | |
access_log off; | |
error_log /var/log/nginx/ws.<YOUR DOMAIN>-error.log error; | |
location / { | |
proxy_http_version 1.1; | |
proxy_set_header Host $http_host; | |
proxy_set_header Scheme $scheme; | |
proxy_set_header SERVER_PORT $server_port; | |
proxy_set_header REMOTE_ADDR $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; | |
proxy_pass http://localhost:4201; | |
} | |
location ~ /\.(?!well-known).* { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment