Created
June 26, 2013 09:36
-
-
Save amichaelgrant/5866135 to your computer and use it in GitHub Desktop.
sample nginx conf for reverse proxying
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
server { | |
listen 80; | |
server_name server.example.com; | |
rewrite ^(.*) https://$server_name$1 permanent; | |
} | |
server { | |
listen 443; | |
server_name server.example.com server; | |
ssl on; | |
ssl_certificate /certs/ssl.crt; | |
ssl_certificate_key /certs/ssl.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv2 SSLv3 TLSv1; | |
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; | |
ssl_prefer_server_ciphers on; | |
access_log /var/log/nginx/access.log; | |
location / { | |
proxy_pass http://127.0.0.1:8080/; | |
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; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 90; | |
proxy_send_timeout 90; | |
proxy_read_timeout 90; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment