Skip to content

Instantly share code, notes, and snippets.

@we4tech
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save we4tech/9932317 to your computer and use it in GitHub Desktop.
Save we4tech/9932317 to your computer and use it in GitHub Desktop.
nginx-tomcat
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