【发布时间】:2013-12-13 18:27:46
【问题描述】:
当访问一个唯一的 URL 时,我正在尝试使用 proxy_pass 设置 nginx:
location ~ /proxy/(?<var>.+) {
proxy_pass $var;
}
当我访问http://example.com/proxy/http://google.com 时,我收到 500 Internal Server Error,错误日志有以下条目:
“http:/google.com”中的 URL 前缀无效,客户端:2.33.214.165, 服务器:example.com,请求:“GET /proxy/http://google.com HTTP/1.1”, 主机:“example.com”
有什么原因导致 nginx 在 URL 中不包含第二个/?
【问题讨论】:
标签: nginx