"index" directive not working with dynamic server_name
Igor Sysoev
igor at sysoev.ru
Tue Dec 14 14:50:20 MSK 2010
On Tue, Dec 14, 2010 at 06:23:36AM -0500, eckstac wrote:
> 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.+)\.(?P.+)\.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.....
Could you create a debug log:
http://nginx.org/en/docs/debugging_log.html
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list