Welcome! Log In Create A New Profile

Advanced

Zend Framework app in a subdir help..

Posted by wipeout_dude 
Zend Framework app in a subdir help..
January 02, 2012 09:51AM
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..
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 209
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready