Hi,
I recently upgraded to nginx 0.8.53 as it has support for regular expressions in the server_name directive.
However, when using this, the index directive gets ignored and a directory listing is displayed.
I've included part of the file which is causing the problem below. Essentially, when I visit a host matched by the server_name, I get a directory listing. One of the files in the directory is index.php - which is set as one of the "indexes".
Has anyone experienced similar issues to this?
server {
server_name ~^staging-(?P<version>.+)\.(?P<domain>.+)\.com$;
root /var/www/htdocs/site1/staging/$domain-staging-$version/public/;
autoindex on;
error_log /var/log/nginx/site1-staging.error.log info
index index.php index.html index.htm;
# file continues.....