Hi,
I have a Zend Framework app that I am trying to get working on my new nginx server..
I have worked out how to get it to run in its own subdomain (eg http://app.domain.com) using the following..
######
server {
server_name app.domain.com;
root /home/www.domain.com/public_html/app;
index index.html index.htm index.php;
location / {
# This is cool because no php is touched for static content
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9002;
fastcgi_index index.php;
include fastcgi_params;
}
}
#####
I would however like the app to run as it did in Apache in a subdir (eg http://www.domain.com/subdir)..
I treid..
#####
location /app {
index index.php
# This is cool because no php is touched for static content
try_files $uri $uri/ /app/index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9002;
fastcgi_index index.php;
include fastcgi_params;
}
}
#####
...but this doesn't work..
If I go to www.domain.com/app I get the start page which is a login.. When I login it tries to open the path www.domain.com/app/section/index which returns a 404 error..
Can someone help?
Thanks..