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;
}
}