cache configuration

automatix nginx-forum at nginx.us
Wed Feb 6 18:45:00 UTC 2013


Hello!

I have to reopen this topic, because the issue is back...

I have a basic host file, that defines thr root folder for a host as:

# file ax-common-vhost
server {
    if ($host ~ ^(?<project>.+)\.(?<area>.+)\.loc$) {
        set $folder "$area/$project";
    }
    ...
    root /var/www/$folder/;
}

Now I want to add another basic vhost file for Zend Framework projects.
There the webroot should be in the older "public" directly under the root.
So I created a copy of my basic vhost file with a new root rule:

# ax-zf-vhost
server {
    if ($host ~ ^(?<project>.+)\.(?<area>.+)\.loc$) {
        set $folder "$area/$project";
    }
    ...
    root /var/www/$folder/public/;
}

# file zf1sandbox.sandbox.loc
include /etc/nginx/sites-available/ax-zf-vhost;

But it's not working. The server tries to open the path of the zf1sandbox
project root, cannot find any index file there and throws a 403 error.

I've already set the sendfile setting to "off" in all relevant
files/segments:

# file nginx.conf
http {
    ...
    sendfile off;
    ...
}

# file ax-zf-vhost
server {
    location / {
        index index.html index.php;
	sendfile off;
    }
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,235601,235971#msg-235971



More information about the nginx mailing list