Last active
December 14, 2015 20:09
-
-
Save holysugar/5141710 to your computer and use it in GitHub Desktop.
/etc/nginx/conf.d/proxy-5t125.conf
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
| upstream growthforecast { | |
| server 127.0.0.1:5125; | |
| } | |
| log_format ltsv 'time:$time_local\t' | |
| 'host:$remote_addr\t' | |
| 'request:$request\t' | |
| 'status:$status\t' | |
| 'size:$body_bytes_sent\t' | |
| 'referer:$http_referer\t' | |
| 'ua:$http_user_agent\t' | |
| 'reqtime:$request_time\t' | |
| 'upsttime:$upstream_response_time'; | |
| server { | |
| listen 80 default_server; | |
| server_name YOURSERVERNAME; | |
| access_log /var/log/nginx/access.log ltsv; | |
| error_log /var/log/nginx/error.log warn; | |
| root /usr/share/nginx/html; | |
| index index.html index.htm; | |
| location / { | |
| proxy_pass http://growthforecast; | |
| #proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; | |
| proxy_redirect off; | |
| proxy_buffering 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 $scheme; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment