Last active
June 21, 2021 14:37
-
-
Save armsultan/cacbcfd51424df95d321f8768a3c8dfd to your computer and use it in GitHub Desktop.
nginx-manager-https.conf
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
| # nginx-manager-https.conf | |
| # * This config is disabled when `.disabled` is appended to file, i.e nginx-manager-noauth-https.conf.disabled | |
| # * HTTP 301 redirect to HTTPS | |
| # * Proxy UI/API with no auth to 127.0.0.1 on nginx-manager | |
| # * Include nginx-manager-upstreams.conf for the proxy_pass to work | |
| # To enable this HTTPS Config: | |
| # * Make sure your crt, key and dhparams exist per the config | |
| # * Disable nginx-manager-noauth-http.conf by removing file or rename the file to end with anything other than `.conf` | |
| # e.g., `nginx-manager-noauth-http.conf.disabled` | |
| # * Remove `.disabled` from the filename, i.e nginx-manager-noauth-https.conf.disabled > nginx-manager-noauth-https.conf | |
| # * Start NGINX with this config enabled or reload NGINX on the fly | |
| # generated 2021-03-23, Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1d, intermediate configuration | |
| # https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1d&guideline=5.6 | |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| return 301 https://$host$request_uri; | |
| } | |
| server { | |
| listen 443 ssl http2; | |
| listen [::]:443 ssl http2; | |
| server_name nim.example.com; | |
| # Certificate and key e.g. | |
| ssl_certificate /etc/ssl/t3st.org/fullchain.pem; | |
| ssl_certificate_key /etc/ssl/t3st.org/privkey.pem; | |
| ssl_session_timeout 1d; | |
| ssl_session_cache shared:MozSSL:10m; # about 40000 sessions | |
| ssl_session_tickets off; | |
| # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam | |
| ssl_dhparam /etc/ssl/dhparam/dhparam.pem; | |
| # intermediate configuration | |
| 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-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; | |
| ssl_prefer_server_ciphers off; | |
| # HSTS (ngx_http_headers_module is required) (63072000 seconds) | |
| add_header Strict-Transport-Security "max-age=63072000" always; | |
| # OCSP stapling | |
| ssl_stapling on; | |
| ssl_stapling_verify on; | |
| # verify chain of trust of OCSP response using Root CA and Intermediate certs | |
| ssl_trusted_certificate /etc/ssl/t3st.org/fullchain.pem; | |
| # replace with the IP address of your resolver | |
| resolver 8.8.8.8; | |
| location / { | |
| proxy_pass http://nginx-manager_servers; | |
| health_check uri=/swagger-ui/; | |
| } | |
| } | |
| # vim: syntax=nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment