-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
29 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,49 @@ | ||
# generated 2024-11-07, Mozilla Guideline v5.7, nginx 1.26.0, OpenSSL 3.0.13, modern configuration, no OCSP | ||
# https://ssl-config.mozilla.org/#server=nginx&version=1.26.0&config=modern&openssl=3.0.13&ocsp=false&guideline=5.7 | ||
worker_processes auto; | ||
pid /run/nginx.pid; | ||
error_log /var/log/nginx/error.log; | ||
|
||
server { | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
http2 on; | ||
events { | ||
worker_connections 768; | ||
} | ||
|
||
http { | ||
sendfile on; | ||
tcp_nopush on; | ||
types_hash_max_size 2048; | ||
|
||
ssl_certificate /etc/nginx/ssl/req.pem; | ||
ssl_certificate_key /etc/nginx/ssl/key.pem; | ||
ssl_session_timeout 1d; | ||
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
# modern configuration | ||
ssl_protocols TLSv1.3; | ||
ssl_prefer_server_ciphers off; | ||
|
||
location / { | ||
proxy_pass http://localhost:8080; | ||
proxy_redirect off; | ||
# proxy_redirect http://localhost:8080/ $scheme://$http_host/; | ||
proxy_set_header Host $host; | ||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-For $remote_addr; | ||
# proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_read_timeout 20d; | ||
proxy_buffering off; | ||
|
||
access_log /var/log/nginx/access.log; | ||
|
||
server { | ||
listen 443 ssl; | ||
listen [::]:443 ssl; | ||
http2 on; | ||
|
||
ssl_certificate /etc/nginx/ssl/req.pem; | ||
ssl_certificate_key /etc/nginx/ssl/key.pem; | ||
ssl_session_timeout 1d; | ||
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions | ||
|
||
location / { | ||
proxy_pass http://localhost:8080; | ||
proxy_redirect off; | ||
# proxy_redirect http://localhost:8080/ $scheme://$http_host/; | ||
proxy_set_header Host $host; | ||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-For $remote_addr; | ||
# proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
# proxy_set_header Connection $connection_upgrade; | ||
proxy_read_timeout 20d; | ||
proxy_buffering off; | ||
} | ||
} | ||
} | ||
} |