Have nginx 1.0.6 PHP5-FPM on a vps with two enabled sites - default & sandbox. both have different pools - default is, sandbox is unix:/tmp/php5-fpm.sock.

traffic to domain.com is served by default, sandbox.domain.com is by sandbox. Both work fine serving php apps.

I decided to flip on pm.status_path on both - default is /status1, sandbox is /status.

I can curl & get a response.

pool:                 default
process manager:      dynamic
start time:           10/Oct/2011:18:14:24 -0500
start since:          8771
accepted conn:        61
listen queue:         0
max listen queue:     0
listen queue len:     128
idle processes:       2
active processes:     1
total processes:      3
max active processes: 1
max children reached: 0

However, returns a "the page you are looking for is temporily unavailable. Please try again later"

default's rule is pretty standard.

location ~ ^/(status|status1|ping)$ {
        fastcgi_param  QUERY_STRING       $query_string;
        fastcgi_param  REQUEST_METHOD     $request_method;
        fastcgi_param  CONTENT_TYPE       $content_type;
        fastcgi_param  CONTENT_LENGTH     $content_length;

        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        fastcgi_param  REQUEST_URI        $request_uri;
        fastcgi_param  DOCUMENT_URI       $document_uri;
        fastcgi_param  DOCUMENT_ROOT      $document_root;
        fastcgi_param  SERVER_PROTOCOL    $server_protocol;

        fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
        fastcgi_param  SERVER_SOFTWARE    nginx;

        fastcgi_param  REMOTE_ADDR        $remote_addr;
        fastcgi_param  REMOTE_PORT        $remote_port;
        fastcgi_param  SERVER_ADDR        $server_addr;
        fastcgi_param  SERVER_PORT        $server_port;
        fastcgi_param  SERVER_NAME        $server_name;

        fastcgi_pass            ;
        fastcgi_read_timeout              300;
        fastcgi_intercept_errors          on;

        allow                   ;
        deny                              all;



Create a separate location for /status, something like this:

    location /status {
        fastcgi_pass unix:/tmp/php5-fpm.sock;
        include fastcgi.conf;

        fastcgi_intercept_errors        on;
        error_page 404 /error/404.php;
  • oh - create /status in default and point to the pool being used in sandbox. Didn't consider that. Thanks! – jimg Oct 11 '11 at 4:37
    location /php-fpm-pool1 {
        fastcgi_pass unix:/var/run/php5-fpm-pool1.sock;
        fastcgi_param  QUERY_STRING    $query_string;    #Allow ?json arg
        fastcgi_param  REQUEST_METHOD  GET;
        fastcgi_param  SCRIPT_NAME     /php-fpm-status;
        fastcgi_param  SCRIPT_FILENAME /php-fpm-status;
        deny all;
    location /php-fpm-pool2 {
        fastcgi_pass unix:/var/run/php5-fpm-pool2.sock;
        fastcgi_param  QUERY_STRING    $query_string;
        fastcgi_param  REQUEST_METHOD  GET;
        fastcgi_param  SCRIPT_NAME     /php-fpm-status;
        fastcgi_param  SCRIPT_FILENAME /php-fpm-status;
        deny all;
  • It's normally recommended to provide an explanation along with any config or code samples in your answer - can you add one please? – BE77Y Feb 25 '16 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.