The Zend Framework based site I have been working on is now being migrated to its production server. This server turns out to be nginx (surprise!). Naturally the site does not w
Actually i run a nginx with a drupal site that work like zend framework: one index.php as bootstrap
this is the rule (not tested on zend framework, just on drupal, but should be similar)
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
break;
}
}
error_page 404 /index.php;
I know it's a pretty old thread but it might help some people anyway.
Basically it redirects any 404 error to index.php, but if the file exists (type file) it will set the right root.
I did it from the top of my head. It might not be working right away, and you have to put the right path and fastcgi config. I also put everything back to index.php as it should work like that with Zend_Framework
error_page 404 = /index.php;
location / {
if (-f $request_filename) {
root /var/www;
}
}
location ~ \.php$ {
fastcgi_pass unix:/tmp/php.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/index.php;
include /etc/nginx/fastcgi_params;
}