strange /dir -> /dir/ redirect in mapped case

KPOXA kpoxa at kpoxa.net
Thu Jul 6 10:21:03 MSD 2006


Dmitry Morozovsky пишет:
> Коллеги,
>
>
> Вот такой фрагмент конфига
>
>     server {
>         listen          195.54.192.44:80;
>         server_name     _ ;
>         location / {
>                 root    /$sroot;
>                 index   index.html index.php;
>         }
>         location ~* \.(ico|jpg|jpeg|gif|zip|exe|t?gz|png|mp3|avi|mpg|mpeg|txt|s?html?|css|js)$ {
>                 root    /$sroot;
>         }
>         location ~ /\.ht {
>                 deny  all;
>         }
>         location ~ \.php$ {
>                 proxy_pass   http://127.0.0.1;
>         }
>     }
>
> Приводит вот к чему:
>
> root at kucha:/usr/local/etc# telnet kucha 80
> Trying 195.54.192.44...
> Connected to kucha.rinet.ru.
> Escape character is '^]'.
> HEAD /ports HTTP/1.0
> Host: freebsd.rinet.ru
>
> HTTP/1.1 301 Moved Permanently
> Server: nginx/0.3.49
> Date: Thu, 06 Jul 2006 06:06:30 GMT
> Content-Type: text/html
> Content-Length: 185
> Location: http://_/ports/
> Connection: close
>
> Connection closed by foreign host.
>
>
> Это как???
>
> Sincerely,
> D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
> ------------------------------------------------------------------------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
> ------------------------------------------------------------------------
>
>
>   
Все верно, обращение к каталогу без последнего слэша всегда приводит к 
редиректы с добавлением слэша, а хостнэйм у вас сами видите какой, так 
что все верно.

-- 
тел./факс: +7 (812) 323-23-23 (Санкт-Петербург)
тел./факс: +7 (095) 737-09-77 (Москва)

С уважением, Нарманов Рустам.






More information about the nginx-ru mailing list