Skip to content

Instantly share code, notes, and snippets.

@caquino
Created November 22, 2013 02:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caquino/7593884 to your computer and use it in GitHub Desktop.
Save caquino/7593884 to your computer and use it in GitHub Desktop.
PHP Persistent connections
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;
}
}
@xeoncross
Copy link

So, PHP can use the persistent connection opened by nginx or nginx routes traffic to/from a PHP server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment