Re: wildcard

'Rush' rush.zlo gmail.com
22 11:17:26 UTC 2011


    nginx     dns.
     8.8.8.8

2011/9/22 fura <furmanyk.ea  gmail.com>:
> 2011/9/21   <a.vasilishin  kpi.ua>
>>
>> 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  nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>



-- 
Cogito ergo sum


nginx-ru