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: wildcard



2011/9/21 <a.vasilishin@xxxxxx>
21.09.2011 15:23, fura :
.

wildcard
:
*.mysite.ru <http://mysite.ru>

:
*.mysite.local
nginx' .

.local .

.



, , *.mysite.ru .
server {
allow y.y.y.y;
allow z.z.z.z/24;
deny all;
server_name ~^(?<domain>.+)$;
access_log /var/log/nginx/proxy.access.log main;
error_log /var/log/nginx/proxy.error.log crit;
listen 1.1.1.1:80;
resolver 8.8.8.8; #DNS
location / {
proxy_bind 2.2.2.2;
proxy_pass http://$domain;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}
}


127.0.0.1 bind, *.mysite.ru


server {
listen 80;
resolver 127.0.0.1;
server_name ~^(?<domain>.+)\.mysite\.ru$;
location / {
proxy_bind 192.168.1.1;
proxy_pass http://$domain.mysite.ru/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

:

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


 




Copyright © Lexa Software, 1996-2009.