Created
July 5, 2018 19:02
-
-
Save harishankards/df1fbb56315cbe6f22486a12fa391f8b to your computer and use it in GitHub Desktop.
SB server config
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
| server { | |
| listen 80; | |
| return 301 https://$host$request_uri; | |
| } | |
| server { | |
| listen 443; | |
| server_name studentburger.com; | |
| ssl on; | |
| # Use certificate and key provided by Let's Encrypt: | |
| ssl_certificate /etc/letsencrypt/live/studentburger.com/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/studentburger.com/privkey.pem; | |
| ssl_session_timeout 5m; | |
| ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
| ssl_prefer_server_ciphers on; | |
| ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
| # Pass requests for / to localhost:8080: | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_pass http://localhost:3000/; | |
| proxy_ssl_session_reuse off; | |
| proxy_set_header Host $http_host; | |
| proxy_cache_bypass $http_upgrade; | |
| proxy_redirect off; | |
| } | |
| } | |
| server { | |
| listen 443; | |
| server_name studentburger.com; | |
| ssl on; | |
| # Use certificate and key provided by Let's Encrypt: | |
| ssl_certificate /etc/letsencrypt/live/studentburger.com/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/studentburger.com/privkey.pem; | |
| ssl_session_timeout 5m; | |
| ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
| ssl_prefer_server_ciphers on; | |
| ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
| # Pass requests for / to localhost:8080: | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_pass http://localhost:8080/; | |
| proxy_ssl_session_reuse off; | |
| proxy_set_header Host $http_host; | |
| proxy_cache_bypass $http_upgrade; | |
| proxy_redirect off; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment