Created
February 20, 2012 22:41
-
-
Save javierwilson/1872008 to your computer and use it in GitHub Desktop.
soltando la conexión h ttp inmediatamente con nginx
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
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