<div dir="ltr">Thank you! I got it working.<br><br>It seemed to be an issue with using $document_root$fastcgi_script_name as my SCRIPT_FILENAME. I changed it to: $request_filename, and it works fine now.<br><br>Thanks!<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 20, 2013 at 11:02 PM, Steve Holdoway <span dir="ltr"><<a href="mailto:steve@greengecko.co.nz" target="_blank">steve@greengecko.co.nz</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">fastcgi_param QUERY_STRING $query_string;<br>
fastcgi_param REQUEST_METHOD $request_method;<br>
fastcgi_param CONTENT_TYPE $content_type;<br>
fastcgi_param CONTENT_LENGTH $content_length;<br>
<br>
fastcgi_param SCRIPT_FILENAME $request_filename;<br>
fastcgi_param SCRIPT_NAME $fastcgi_script_name;<br>
fastcgi_param REQUEST_URI $request_uri;<br>
fastcgi_param DOCUMENT_URI $document_uri;<br>
fastcgi_param DOCUMENT_ROOT $document_root;<br>
fastcgi_param SERVER_PROTOCOL $server_protocol;<br>
<br>
fastcgi_param GATEWAY_INTERFACE CGI/1.1;<br>
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;<br>
<br>
fastcgi_param REMOTE_ADDR $remote_addr;<br>
fastcgi_param REMOTE_PORT $remote_port;<br>
fastcgi_param SERVER_ADDR $server_addr;<br>
fastcgi_param SERVER_PORT $server_port;<br>
fastcgi_param SERVER_NAME $server_name;<br>
<br>
# GeoIP - just country at the moment.<br>
fastcgi_param GEOIP_COUNTRY_CODE $geoip_country_code;<br>
<br>
# PHP only, required if PHP was built with --enable-force-cgi-redirect<br>
fastcgi_param REDIRECT_STATUS 200;<br>
<br>
fastcgi_connect_timeout 60;<br>
fastcgi_send_timeout 1800;<br>
fastcgi_read_timeout 1800;<br>
fastcgi_buffer_size 128k;<br>
fastcgi_buffers 8 256k;<br>
fastcgi_busy_buffers_size 256k;<br>
fastcgi_temp_file_write_size 256k;<br>
fastcgi_intercept_errors on;<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, 2013-06-20 at 22:50 -0400, Schiz0 wrote:<br>
> I don't know why, but it is simply not working for me. I tried<br>
> changing my SCRIPT_FILENAME to match yours exactly, and I changed my<br>
> location block to "location ~ ^/fpm-status$ {}" - as opposed to using<br>
> "=". Same problems.<br>
><br>
><br>
> I also tried toggling fastcgi_intercept_errors to see if that did<br>
> anything.<br>
><br>
><br>
><br>
> May I ask to see your fastcgi_params file?<br>
><br>
><br>
><br>
> On Thu, Jun 20, 2013 at 10:41 PM, Steve Holdoway<br>
> <<a href="mailto:steve@greengecko.co.nz">steve@greengecko.co.nz</a>> wrote:<br>
> On Thu, 2013-06-20 at 22:31 -0400, Schiz0 wrote:<br>
> > Hello list,<br>
> ><br>
> ><br>
> > I use php-fpm via fastcgi to handle my PHP scripts. I have<br>
> that<br>
> > working successfully. PHP-FPM has a feature where it<br>
> displays a status<br>
> > page, as mentioned here:<br>
> ><br>
> <a href="http://php.net/manual/en/install.fpm.configuration.php#pm.status-path" target="_blank">http://php.net/manual/en/install.fpm.configuration.php#pm.status-path</a><br>
> ><br>
> ><br>
> > I'd like to be able to access this through nginx. I tried<br>
> setting my<br>
> > configuration to what I would expect to work, but, alas, it<br>
> does not.<br>
> ><br>
> > Here's my configuration:<br>
> > <a href="http://p.ngx.cc/042567f732ada334" target="_blank">http://p.ngx.cc/042567f732ada334</a><br>
> ><br>
> ><br>
> > The error I get when I try to browse to<br>
> <a href="http://domain.com/fpm-status" target="_blank">domain.com/fpm-status</a> is:<br>
> > "File not found."<br>
> ><br>
> > in my browser, and in the nginx error log:<br>
> ><br>
> > 2013/06/20 22:29:51 [error] 85006#0: *13 FastCGI sent in<br>
> stderr:<br>
> > "Primary script unknown" while reading response header from<br>
> upstream,<br>
> > client: x.x.x.132, server: <a href="http://domain.com" target="_blank">domain.com</a>, request:<br>
> "GET /fpm-status<br>
> > HTTP/1.1", upstream: "fastcgi://unix:/var/run/phpfpm.sock:",<br>
> host:<br>
> > "<a href="http://domain.com" target="_blank">domain.com</a>"<br>
> ><br>
> ><br>
> > Nothing shows up in php-fpm's error log.<br>
> ><br>
> > Thanks for any help/suggestions on getting this working!<br>
><br>
><br>
> For me,<br>
> location ~ ^/(status|ping|apc_info.php)$ {<br>
> include fastcgi_params;<br>
> fastcgi_param SCRIPT_FILENAME $document_root<br>
> $fastcgi_script_name;<br>
> fastcgi_pass backend;<br>
> allow 127.0.0.1;<br>
> deny all;<br>
> }<br>
><br>
> with<br>
> pm.status_path = /status<br>
><br>
> in the pool definition works fine.<br>
><br>
> I use a stub config just to manage 127.0.0.1 access, which<br>
> include a<br>
> load of monitoring stuff.<br>
><br>
> hth,<br>
><br>
> Steve<br>
><br>
><br>
><br>
><br>
> --<br>
> Steve Holdoway BSc(Hons) MNZCS<br>
> <a href="http://www.greengecko.co.nz" target="_blank">http://www.greengecko.co.nz</a><br>
> Linkedin: <a href="http://www.linkedin.com/in/steveholdoway" target="_blank">http://www.linkedin.com/in/steveholdoway</a><br>
> Skype: sholdowa<br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
><br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
--<br>
Steve Holdoway BSc(Hons) MNZCS<br>
<a href="http://www.greengecko.co.nz" target="_blank">http://www.greengecko.co.nz</a><br>
Linkedin: <a href="http://www.linkedin.com/in/steveholdoway" target="_blank">http://www.linkedin.com/in/steveholdoway</a><br>
Skype: sholdowa<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>