Last active
August 29, 2015 13:58
-
-
Save we4tech/9932317 to your computer and use it in GitHub Desktop.
nginx-tomcat
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 default; | |
server_name _; | |
root /opt/apache-tomcat-7.0.53/webapps/ROOT; | |
location / { | |
proxy_pass http://localhost:8080; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_max_temp_file_size 0; | |
expires off; | |
proxy_buffering off; | |
proxy_store off; | |
proxy_connect_timeout 120; | |
proxy_send_timeout 120; | |
proxy_read_timeout 120; | |
# All POST requests go directly | |
if ($request_method = POST) { | |
proxy_pass http://localhost:8080; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment