Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Редирект на выбранный порт
Большое спасибо всем
Помогло вот это:
http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#example
--------------------------------------------------------------------------------
server {
listen X.X.X.X:35002;
location ~
/\.(ht|svn|cvs|hg|txt|log|class|cgi|xml|conf|config|properties|jar) {
deny all;
}
location /snow/ {
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080/ http://X.X.X.X:35002/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
access_log /var/log/snow/admin_access.log;
allow X.X.X.X.;
deny all;
}
}
---------------------------------------------------------------------------------
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,234597,234661#msg-234661
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|