Skip to content

Instantly share code, notes, and snippets.

@Snugglepantz
Created October 31, 2015 22:26
Show Gist options
  • Save Snugglepantz/7537333f748b26fe5334 to your computer and use it in GitHub Desktop.
Save Snugglepantz/7537333f748b26fe5334 to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80;
server_name slashfix.me;
return 301 https://$server_name$request_uri;
}
server {
listen 443 default_server ssl;
server_name slashfix.me;
ssl_certificate /etc/ssl/certs/new/slashfix-bundle.crt;
ssl_certificate_key /etc/ssl/certs/new/slashfix.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 15m;
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA';
ssl_protocols TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/slashfix_client_ssl.access.log;
error_log /var/log/nginx/slashfix_client_ssl.error.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:9000;
}
location /rest/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8080/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment