config file for only static files.

Aleksandar Lazic al-nginx at none.at
Sun Apr 6 11:01:40 MSD 2008


Hi Amer,


On Sam 05.04.2008 22:01, Amer Shah wrote:
>Hey Guys.
>
>I've been trying to figure this out from the site but I just can't :(
>
>What I want is the following
>- When a user puts it just my domain name, I want the server to give
>him the index.htm file .. i.e. if the user enters in example.com I want
>him to get www.example.com/index.htm
>
>
>I tried the following but it I get a 403 forbidden:
>
>     server {
>        listen       80;
>        server_name  localhost;
>        root /usr/local/www/data;
>
>        location / {
>          index index.htm;
>        }
>  }
>
>Am I missing something ?

does user nobody is allowed to read your root?

http://wiki.codemongers.com/NginxMainModule#user

What is in the error_log?

http://wiki.codemongers.com/NginxMainModule#error_log

Cheers

Aleks





More information about the nginx mailing list