<div>Why don't you put </div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-style-span" style="border-collapse: collapse; "> location ~ \.php$ {<br> fastcgi_pass php-fcgi-pool;</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; "> }</span><br class="webkit-block-placeholder"></div><div><span class="Apple-style-span" style="border-collapse: collapse;"><br class="webkit-block-placeholder">
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse;">before "location /" so that it can match first?</span></div><div><br class="webkit-block-placeholder"></div><div>Kupo</div><br>
<div class="gmail_quote">On Feb 10, 2008 1:51 AM, Mike Javorski <<a href="mailto:mike.javorski@gmail.com">mike.javorski@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Denis. The problem w/ your solution is there is lots of<br>directories. I don't want to have to create entries for each. I<br>suppose I could to a regex for .*/$ but some of the directories have<br>index.html instead of index.php, and I need to support that as well<br>
:-(.<br><br>Any other options/suggestions?<br><font color="#888888"><br>- mike<br></font><div><div></div><div class="Wj3C7c"><br>On Feb 9, 2008 10:42 PM, Denis F. Latypoff <<a href="mailto:denis@gostats.ru">denis@gostats.ru</a>> wrote:<br>
> Hello Mike,<br>><br>><br>> Sunday, February 10, 2008, 12:32:14 PM, you wrote:<br>><br>> > I have nginx set up as a load balancer in front of two machines<br>> > running fastcgi/php, and nginx for static content. The desired goal is<br>
> > to have all php pages (including the site index pages of .*/index.php)<br>> > processed by the fastcgi/php upstream, and everything else provided by<br>> > the static servers. The following is what I have and what I believe<br>
> > should have worked, but it appears to run all directory paths via the<br>> > static rule, rather than the php rule which matches the index.<br>><br>> > To sum up:<br>> > / -- via static system (WRONG)<br>
> > /index.php -- via fastcgi/php system (RIGHT)<br>> > /blah/ -- via static system (WRONG)<br>> > /blah/index.php -- via fastcgi/php system (RIGHT)<br>><br>> > nginx version is 0.6.25, Help! :-)<br>
><br>> > tia,<br>><br>> > - mike<br>><br>> > My Config File (the relevent bits anyway):<br>> > ---------------------------------------------------<br>><br>> > http {<br>> > upstream static-pool {<br>
> > server <a href="http://192.168.7.40:80" target="_blank">192.168.7.40:80</a>;<br>> > server <a href="http://192.168.7.41:80" target="_blank">192.168.7.41:80</a>;<br>> > }<br>><br>
> > upstream php-fcgi-pool {<br>> > server <a href="http://192.168.7.40:7000" target="_blank">192.168.7.40:7000</a>;<br>> > server <a href="http://192.168.7.41:7000" target="_blank">192.168.7.41:7000</a>;<br>
> > }<br>><br>> > server {<br>> > listen 80;<br>> > root /website/htdocs;<br>> > index index.php;<br>> > fastcgi_index index.php;<br>> > include /etc/nginx/fastcgi_params;<br>
><br>> > location / {<br>> > proxy_pass <a href="http://static-pool/website/htdocs/" target="_blank">http://static-pool/website/htdocs/</a>;<br>> > }<br>><br>> + location = / {<br>
> + fastcgi_pass php-fcgi-pool;<br>> + }<br>><br>> + location = /blah/ {<br>> + fastcgi_pass php-fcgi-pool;<br>> + }<br>><br>><br>> > location ~ \.php$ {<br>
> > fastcgi_pass php-fcgi-pool;<br>> > }<br>> > }<br>> > }<br>><br>><br>><br>> --<br>> Best regards,<br>> Denis mailto:<a href="mailto:denis@gostats.ru">denis@gostats.ru</a><br>
><br>><br>><br><br></div></div></blockquote></div><br>