Check your scrip_filename line, still pointing to the public location.
If /admin/ is a real location for the root, it should be part of that
param path.
On Oct 8, 4:52 pm, "alexk" <nginx-fo...@nginx.us> wrote:
> Hi,
>
> What I want to do is separate /admin/ folder from rules that I use for zend framework in root of the site - redirecting everything to index.php. /admin/ folder should work in different way. It should execute each script that physically exists there.
>
> I've tried the following configuration but when I request /admin/index.php browser just offer to save it.
>
> location / {
> root /var/www/khayar/public;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
>
> fastcgi_store on;
> fastcgi_store_access user:rw group:rw all:r;
>
> charset utf-8;
>
> fastcgi_param SCRIPT_FILENAME /var/www/khayar/public/index.php;
> include fastcgi_params;
> index index.php;
>
> }
>
> location ~ "(\/userfiles\/)|(\.(log|pdf|ttf|fon|js|ico|txt|xml|html|dtd|gif|jpg|png|cs s|rss|zip|$s|zip|tar\.gz))$" {
> root /var/www/khayar/public;
> expires max;
>
> }
>
> location /admin/ {
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
>
> fastcgi_param SCRIPT_FILENAME /var/www/khayar/public$fastcgi_script_name;
> include fastcgi_params;
>
> }
>
> location ~ /\.ht {
> deny all;
>
> }
>
> It's running on nginx-0.6.39. Any help will be appreciated.
>
> Thanks,
> Alex Kleshchevnikovwww.klalex.com
>
> Posted at Nginx Forum:http://forum.nginx.org/read.php?3,12172,12172#msg-12172