Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


   


   


   















      :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: server_name regexp



. .

2010/9/20 Igor Sysoev <igor@xxxxxxxxx>
On Mon, Sep 20, 2010 at 10:47:13AM +0400, Anton Koldaev wrote:

> . ,
> server- ,
> server {}.

ӣ :

server {
server_name one.sitename.ru
two.sitename.ru
three.sitename.ru
www.sitename.ru
;
...
}

server {
listen 80 default_server
server_name _;
...
}

> $host $server_name:
>
> fastcgi_param SERVER_NAME $host;
> >
>
> 2010/9/20 Igor Sysoev <igor@xxxxxxxxx>
>
> > On Mon, Sep 20, 2010 at 09:51:36AM +0400, Anton Koldaev wrote:
> >
> > >
> > > server_name:
> > >
> > > > # ,
> > > > server_name ~(?<!^one|^two|^three|^www)\.sitename\.ru$;
> > > >
> > >
> > > php- php-fpm:
> > >
> > > > location ~ \.(php|php4|php5|phtml)$ {
> > > > fastcgi_pass 127.0.0.1:9000;
> > > > try_files $fastcgi_script_name =404;
> > > >
> > > > fastcgi_param SERVER_NAME $server_name;
> > > >
> > > ...
> > > >
> > >
> > > , SERVER_NAME , ,
> > ,
> > > one.sitename.ru.
> > > , :
> > >
> > > > 2010/09/20 09:42:20 [notice] 19176#0: *24 rewritten data:
> > > > "/urlrewriteprepend.php", args: "logout=yes&CODE=alozovaya", client:
> > > > 94.198.48.35, server: ~(?<!^one|^two|^three|^www)\.sitename\.ru$,
> > request:
> > > > "GET /blogs/one/index.php?logout=yes&CODE=one HTTP/1.1", host: "
> > > > one.sitename.ru", referrer: "http://one.sitename.ru/"
> > > >
> > >
> > > :
> > >
> > > > Server not found
> > > > Firefox can't find the server at ~(.
> > > >
> > >
> > > :
> > >
> > > > http://
> > > > ~%28/?%3C!^one|^two|^three|^www%29\.sitename\.ru$/?logout=yes&CODE=one
> > > >
> > >
> > > fastcgi_param servername?
> >
> > fastcgi_param SERVER_NAME $host;
> >
> > - , --.
> > ( , ?)
> > :
> >
> > server {
> > server_name one.sitename.ru;
> > }
> >
> > server {
> > server_name two.sitename.ru;
> > }
> >
> > server {
> > server_name three.sitename.ru;
> > }
> >
> > server {
> > server_name www.sitename.ru;
> > }
> >
> > server {
> > listen 80 default_server;
> > server_name _;
> > }
> >
> >
> >
> > --
> >
> > http://sysoev.ru
> >
> > _______________________________________________
> > nginx-ru mailing list
> > nginx-ru@xxxxxxxxx
> > http://nginx.org/mailman/listinfo/nginx-ru
> >
>
>
>
> --
> Best regards,
> Koldaev Anton

> _______________________________________________
> nginx-ru mailing list
> nginx-ru@xxxxxxxxx
> http://nginx.org/mailman/listinfo/nginx-ru


--

http://sysoev.ru

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru



--
Best regards,
Koldaev Anton
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.