Thank you all for your responses.<div><br></div><div>I believe that the missing element in my case was:</div><div><br></div><div>alias /usr/local/nagios/share/$1;</div><div><br></div><div>in the nagios php processing location, I wasn't aware that I would have to specify it there as well, but it makes sense now.</div>
<div><br></div><div>Thanks!<br><br><div class="gmail_quote">On Sun, Oct 3, 2010 at 12:40 AM, Edho P Arief <span dir="ltr"><<a href="mailto:edhoprima@gmail.com">edhoprima@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sun, Oct 3, 2010 at 11:31 AM, Ilan Berkner <<a href="mailto:iberkner@gmail.com">iberkner@gmail.com</a>> wrote:<br>
> Thanks for the advice. When I do it this way, I get an error (nginx error<br>
> log):<br>
> 2010/10/03 00:27:33 [error] 20239#0: *6447<br>
> "/usr/local/nagios/share/nagios/index.php" is not found (2: No such file or<br>
> directory)<br>
> so you can see that nginx is adding /nagios/ to the end of the root<br>
> directory and so the file is not found (generating a 404 on the browser).<br>
> What would be the correct way to address this issue?<br>
><br>
><br>
<br>
</div><div class="im">> location /nagios/<br>
> {<br>
> root /usr/local/nagios/share;<br>
> index index.php;<br>
> }<br>
<br>
</div>use alias.<br>
<br>
location ~ ^/nagios/(.*\.php)$ {<br>
alias /usr/local/nagios/share/$1;<br>
<div class="im"> fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;<br>
</div> fastcgi_index index.php;<br>
fastcgi_param SCRIPT_FILENAME $request_filename;<br>
include fastcgi_params;<br>
}<br>
location = /nagios {<br>
rewrite ^ /nagios/ permanent;<br>
}<br>
location /nagios/ {<br>
index index.php;<br>
alias /usr/local/nagios/share/;<br>
}<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">O< ascii ribbon campaign - stop html mail - <a href="http://www.asciiribbon.org" target="_blank">www.asciiribbon.org</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>