Re: location = / и root

Борис Долгов boris at dolgov.name
Tue Feb 10 16:13:42 MSK 2009


после выполнения index_module делается новый подбор location.
Надо дописать:
location = /index.html {
    root /www/foo;
}

10 февраля 2009 г. 15:44 пользователь asv <asv at pallant-mobile.ru> написал:

> Делаю так:
> server {
>        listen       x.x.x.x:80;
>        listen       x.x.x.x:8181;
>        server_name  foo.ru;
>        location = / {
>                root /www/foo;
>                index index.html;
>        }
> }
> при запросе / в логе получаю:
> *20 open() "/usr/local/etc/nginx/html/index.html" failed
> (2: No such file or directory), client: 79.132.107.15, server: foo.ru,
> request: "GET / HTTP/1.0", host: "foo.ru"
>
> как видно, index.html ищется в /usr/local/etc/nginx/html/ вместо /www/foo
>
> НО!
> при этом, стоит заменить
>        location = / {
> на
>        location / {
> все начинает работать нормально: в ответ на запрос /
> отдается /www/foo/index.html
>
> вопрос: что я делаю не так?
>
>
> --
> С уважением,
>   Сергей Аверьянов
>



-- 
С уважением, Борис Долгов.
icq 77556665
e-mail boris at dolgov.name
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20090210/f7d0ee06/attachment.html>


More information about the nginx-ru mailing list