Created
April 20, 2023 19:04
-
-
Save keevie/81677e13a19e5aba91b768f400ea3271 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
worker_processes 1; | |
worker_rlimit_nofile 200000; | |
events { | |
worker_connections 16384; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
log_format '$upstream_addr - $remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
map $http_upgrade $connection_upgrade { | |
default "upgrade"; | |
} | |
server { | |
listen 80 default_server; | |
server_name _; | |
return 301 https://\$host\$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name $dnsname; | |
ssl_certificate /etc/nginx/fullchain.pem; | |
ssl_certificate_key /etc/nginx/privkey.pem; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; | |
ssl_prefer_server_ciphers on; | |
proxy_read_timeout 30d; | |
location / { | |
proxy_pass http://127.0.0.1:8081; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade \$http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host \$host; | |
proxy_set_header X-Real-IP \$remote_addr; | |
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment