Thanks, <div><br></div><div>I tried it using &quot;root&quot; in the location, still no luck.</div><div><br></div><div>Here&#39;s my config (the parts that matter), the location /nagios/ is what&#39;s not working.  What am I doing wrong? Thanks</div>
<div><br></div><div>http</div><div><div>{</div><div>    root /var/www/html;</div><div>    server</div><div>    {</div><div>        listen  10.0.1.163;</div><div>        server_name  <a href="http://dev.testsite.com">dev.testsite.com</a>;</div>
<div>        location /nagios/</div><div>        {</div><div>                root /usr/local/nagios/share;</div><div>                index index.php;</div><div>        }</div><div>        location /</div><div>        {</div>
<div>                index  index.php;</div><div>                error_page 404 = @joomla;</div><div>                log_not_found off;</div><div>        }</div><div>        location @joomla</div><div>        {</div><div>
                rewrite ^(.*)$ /index.php?q=$1 last;</div><div>        }</div><div><br></div><div>        location ~ \.php$</div><div>        {</div><div>                include fcgi;</div><div>                fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;</div>
<div>        }</div><div><br></div><div>    }</div><div>}</div></div><div><br></div><div><br><br><div class="gmail_quote">On Sat, Oct 2, 2010 at 7:23 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;"><div class="im">On 3 Out 2010 00h05 WEST, <a href="mailto:iberkner@gmail.com">iberkner@gmail.com</a> wrote:<br>
<br>
&gt; we have a very simple configuration.<br>
&gt;<br>
&gt; server block with location block<br>
&gt;<br>
&gt; php is served through fastcgi and works fine<br>
&gt;<br>
&gt; would like to add something like this:<br>
&gt;<br>
&gt; location /nameofalias/<br>
&gt; {<br>
&gt; alias /usr/local/nameofalias;<br>
&gt; }<br>
<br>
</div>This is now how alias is supposed to be used. In fact you&#39;re using<br>
alias like a root directive. Using alias is for when you want to use a<br>
certain base directory and don&#39;t want the URI to reflect that.<br>
<br>
location /foo {<br>
  alias /var/www/nginx-default/barz;<br>
}<br>
<br>
Request for /foo/xpto.png is translated to<br>
<br>
   /var/www/nginx-default/barz/xpto.png<br>
<div class="im"><br>
&gt; but it does not seem to work, static files load fine.<br>
<br>
&gt; the php location block is like this and works fine for the main<br>
&gt; location block of &quot;location /&quot;<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>
<br>
</div>You should have a fastcgi_pass directive where you want the PHP files<br>
to be handled.<br>
<br>
Also you need to escape the &quot;.&quot; as in<br>
<br>
location ~ \.php$ {<br>
  (...)<br>
}<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>
</blockquote></div><br></div>