Last active
October 16, 2015 15:10
-
-
Save MartijnR/2e03a7938d74dd884136 to your computer and use it in GitHub Desktop.
A+ SSL installation with NGINX (for enketo-express)
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; | |
server_name odk.enke.to; | |
return 307 https://$server_name$request_uri; | |
} | |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/odk-enke-to-ssl-bundle.crt; | |
ssl_certificate_key /etc/nginx/ssl/odk-enke-to.key; | |
server_name odk.enke.to; | |
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:E$ | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_session_cache shared:SSL:10m; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
resolver 8.8.4.4 8.8.8.8 valid=300s; | |
resolver_timeout 10s; | |
ssl_prefer_server_ciphers on; | |
ssl_dhparam /etc/nginx/ssl/dhparam.pem; | |
add_header Strict-Transport-Security max-age=63072000; | |
add_header X-Frame-Options DENY; | |
add_header X-Content-Type-Options nosniff; | |
location / { | |
proxy_pass http://127.0.0.1:8005; | |
proxy_redirect off; | |
proxy_set_header Host $host ; | |
proxy_set_header X-Real-IP $remote_addr ; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ; | |
proxy_set_header X-Forwarded-Proto https ; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 15 was apparently copied from an incomplete line of terminal output and so causes a error. FYI