nginx 配置代理服务器

nginx 配置代理服务器

server {
	listen 8090;
	resolver 8.8.8.8;
	location /{
		#proxy_pass http://$http_host$request_uri;
		proxy_pass $scheme://$host$request_uri;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "upgrade";
 
		client_max_body_size 100m;
 
		#allow 127.0.0.1;
		#deny all;
   }
   access_log   /var/log/nginx/proxy-access.log;
   error_log    /var/log/nginx/proxy-error.log;
 }