【发布时间】:2013-10-30 11:59:08
【问题描述】:
我正在使用 nginx 代理,并试图用我的服务器 url 替换基本 url。例如,我想通过我的localhost:8000 代理www.google.com,并将所有基本 url 实例 (www.google.com) 替换为 (localhost:8000)。
到目前为止我的 nginx.conf:
server {
listen 8080;
server_name localhost;
location / {
proxy_pass http://www.google.com/;
rewrite ^/.google.com /localhost:8080 last;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
【问题讨论】:
标签: nginx reverse-proxy proxypass