Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
63 lines (55 sloc) 1.288 kb
worker_processes 5;
#daemon off;
events {
worker_connections 1000;
}
# Only if you want to see lots of spam
error_log log/error_log debug_http;
http {
upstream test_upstreams {
server localhost:11114;
server localhost:11115;
hash $filename;
hash_again 10;
healthcheck_enabled;
healthcheck_delay 1000;
healthcheck_timeout 1000;
healthcheck_failcount 1;
# Important: There is no \n at the end of this. Or \r. Make sure you
# don't have a \n or \r or anything else at the end of your healthcheck
# response
healthcheck_expected 'I_AM_ALIVE';
# Important: HTTP/1.0
healthcheck_send "GET /health HTTP/1.0" 'Host: www.mysite.com';
# Optional supervisord module support
#supervisord none;
#supervisord_inherit_backend_status;
}
server {
listen 11114;
location / {
root html_11114;
}
}
server {
listen 11115;
location / {
root html_11115;
}
}
server {
listen 81;
location / {
set $filename $request_uri;
if ($request_uri ~* ".*/(.*)") {
set $filename $1;
}
proxy_set_header Host $http_host;
proxy_pass http://test_upstreams;
proxy_connect_timeout 3;
}
location /stat {
healthcheck_status;
}
}
}
Jump to Line
Something went wrong with that request. Please try again.