Thank you for your suggestion, I remember the vigorous discussion that took place regarding this issue, in this particular case, this is a test / development system so I&#39;m not as concerned as I normally would be.<div><br>
</div><div>In our production environment, things are a bit more rigid.</div><div><br></div><div><br><br><div class="gmail_quote">On Sat, Oct 2, 2010 at 9:29 PM, António P. P. Almeida <span dir="ltr">&lt;<a href="mailto:appa@perusio.net">appa@perusio.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On 3 Out 2010 01h23 WEST, <a href="mailto:iberkner@gmail.com">iberkner@gmail.com</a> wrote:<br>
<br>
&gt; [1  &lt;multipart/alternative (7bit)&gt;]<br>
&gt; [1.1  &lt;text/plain; ISO-8859-1 (quoted-printable)&gt;]<br>
<div class="im">&gt; Thanks,<br>
&gt;<br>
&gt; I tried it using &quot;root&quot; in the location, still no luck.<br>
&gt;<br>
&gt; Here&#39;s my config (the parts that matter), the location /nagios/ is<br>
&gt; what&#39;s not working.  What am I doing wrong? Thanks<br>
&gt;<br>
&gt; http<br>
&gt; {<br>
&gt; root /var/www/html;<br>
&gt; server<br>
&gt; {<br>
&gt; listen  10.0.1.163;<br>
&gt; server_name  <a href="http://dev.testsite.com" target="_blank">dev.testsite.com</a>;<br>
&gt; location /nagios/<br>
&gt; {<br>
&gt; root /usr/local/nagios/share;<br>
&gt; index index.php;<br>
&gt; }<br>
&gt; location /<br>
&gt; {<br>
&gt; index  index.php;<br>
&gt; error_page 404 = @joomla;<br>
&gt; log_not_found off;<br>
&gt; }<br>
&gt; location @joomla<br>
&gt; {<br>
&gt; rewrite ^(.*)$ /index.php?q=$1 last;<br>
&gt; }<br>
&gt;<br>
&gt; location ~ \.php$<br>
&gt; {<br>
&gt; include fcgi;<br>
&gt; fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;<br>
&gt; }<br>
&gt;<br>
&gt; }<br>
&gt; }<br>
<br>
</div>For security reasons I suggest you constrain which exact locations can<br>
be used for FastCGI. Using a generic regex for any file with php<br>
extension opens a big security hole. This was discussed not long ago<br>
on the list.<br>
<br>
Instead you should enumerate which files are to be handled by FastCGI<br>
and return a 404 for every other file that is not enumerated. E.g.,<br>
<br>
location ~* ^/index\.php$ {<br>
<div class="im">  include fcgi;<br>
  fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;<br>
}<br>
<br>
</div>And put at the end of the config file:<br>
<br>
# Any other attempt to access PHP files returns a 404.<br>
location ~* ^.+\.php$ {<br>
  return 404;<br>
<div><div></div><div class="h5">}<br>
<br>
--- appa<br>
<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>