Skip to content

Instantly share code, notes, and snippets.

@javierwilson
Created February 20, 2012 22:41
Show Gist options
  • Save javierwilson/1872008 to your computer and use it in GitHub Desktop.
Save javierwilson/1872008 to your computer and use it in GitHub Desktop.
soltando la conexión h ttp inmediatamente con nginx
server {
# this is to serve a 200.txt static file
listen 8888;
root /usr/share/nginx/html/;
}
server {
listen 8999;
location / {
rewrite ^ /200.txt break;
}
error_page 405 =200 @405;
location @405 {
# post_action: after this, do @post
post_action @post;
# this will go to nginx running on another port
proxy_method GET;
proxy_pass http://127.0.0.1:8888;
}
location @post {
# this will go to the apache server.
# it will take a long time to process this request
proxy_method POST;
proxy_pass http://127.0.0.1/$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment