Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Замена $request method в proxy pass

$
0
0
Хоть Валентин и говорит, что нгинкс не форвард прокси, все же есть
вариант использования его в nаком ключе, хоть и не полноценный:


server {
server_name ~^(?<domain>.+)$;
access_log /var/log/nginx/proxy.access.log main;
error_log /var/log/nginx/proxy.error.log crit;
listen 3128;
resolver 8.8.8.8;
auth_basic "Authentication required";
auth_basic_user_file /path/to/.htpasswd;
location / {
proxy_pass http://$domain;
proxy_http_version 1.1;
proxy_set_header Connection "";
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;

}
}


--
WBR, Andrey Vasilishin CDIG1-UANIC, CDIG1-RIPE

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

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>