Created
February 3, 2015 08:22
-
-
Save leitu/27967aaef7717a195ef0 to your computer and use it in GitHub Desktop.
Nginx proxy
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
upstream geminabox{ | |
server 10.18.2.179:8080; | |
} | |
server { | |
listen 8081; | |
server_name _; | |
root /repo/gems; | |
client_max_body_size 20m; | |
keepalive_timeout 5; | |
access_log /var/log/geminabox_access.log; | |
error_log /var/log/geminabox_error.log; | |
location / { | |
# proxy_pass http://geminabox; | |
try_files $uri $uri/index.html $uri.html @geminabox; | |
} | |
location @geminabox { | |
proxy_redirect off; | |
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; | |
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_pass http://geminabox; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment