Zend Framework additional Get params with NGINX

Posted by Johni on Stack Overflow See other posts from Stack Overflow or by Johni
Published on 2011-09-08T12:12:59Z Indexed on 2012/09/16 21:38 UTC
Read the original article Hit count: 168

Filed under:
|
|
|

I configured my NGINX for Zend in the following way (PHP 5.3 with fpm):

server {
root /home/page/public/;
index index.php index.html index.htm;

server_name localhost;

location / {
    try_files $uri $uri/ /index.php;
}

location ~ \.php$ {
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

location ~ /\.ht {
    deny all;
}
}

Now i want to process additional get params like: http://web.site/index?par=1

WIth my local dev system (Apache) it works fine but not under NGINX which did'T deliver the get params.

Anny suggestions?

Edit:

Now i use the following config which seems to work but i'm not happy with it since everybody suggests "use try_files whenever possible".

location / {
    if (!-e $request_filename) {
        rewrite  /(.*)$  /index.php?q=$1  last;
        break;
    }
}

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework