nginx配置网站全站转发
发布时间:
2024-09-11
预览次数:
如下,将本地接收到的8880的请求,全部转发到另一台机器。实现真正的反向代理。
server { listen 8880; server_name localhost; location / { proxy_pass http://192.168.30.20:8880/; proxy_redirect default; proxy_set_header Host $http_host; proxy_set_header X-ReallP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 30s; proxy_send_timeout 60s; proxy_read_timeout 60s; proxy_buffering on; proxy_buffer_size 32k; proxy_buffers 4 128k; proxy_busy_buffers_size 256k; proxy_max_temp_file_size 256k; } }
上一篇:
已经没有了