Created
November 22, 2013 02:38
-
-
Save caquino/7593884 to your computer and use it in GitHub Desktop.
PHP Persistent connections
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
upstream webservice-pers { | |
server webservices.remoteserver.com:80 max_fails=0 fail_timeout=30s; | |
keepalive 1024; | |
} | |
server { | |
listen 8080; | |
server_name webservices.localserver.com; | |
location / { | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_set_header Host "webservices.remoteserver.com"; | |
proxy_pass https://webservice-pers; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, PHP can use the persistent connection opened by nginx or nginx routes traffic to/from a PHP server?