本文共 614 字,大约阅读时间需要 2 分钟。
反向代理参数: proxy_pass
server { listen 30000; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; # 正则匹配 location ~ .*\.(html|js|css|png|svg|jpg)?$ { # 一般匹配 location / { proxy_set_header X-real-ip $remote_addr; # 代理的ip和端口 proxy_pass http://ip:prot; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
转载地址:http://rylk.baihongyu.com/