【发布时间】:2019-11-25 13:27:47
【问题描述】:
我正在尝试从浏览器访问 URL
http://example.com/validateResetPassword/?access_token=8E27UWYuamdf
我的 Nginx 位置映射是:
location ~* /validateResetPassword {
proxy_pass http://localhost:8085/$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
所以每当请求来自浏览器时
http://example.com/validateResetPassword/?access_token=8E27UWYuam
它应该重定向到我在端口 8085 上的 Spring Boot 应用程序。 删除 ~* 后我也尝试过,但没有任何效果。
另外,我可以看到以下错误:
2019/11/25 13:19:29 [info] 13780#13780: *37 客户端在等待请求时关闭连接,客户端:10.68.104.173,服务器:10.121.42.22:80
2019/11/25 13:19:29 [错误] 13783#13783: *39 没有定义解析器来解析本地主机,客户端:10.68.104.173,服务器:mydoamin.com,请求:“GET /validateResetPassword/dsfsdfsd HTTP /1.1”,主机:“example.com”
2019/11/25 13:19:30 [错误] 13783#13783: *39 重写或内部重定向周期,同时内部重定向到“/index.html”,客户端:10.68.104.173,服务器:uc1f-bioinfocloud- algae-dev,请求:“GET /favicon.ico HTTP/1.1”,主机:“uc1f-bioinfocloud-algae-dev”,引用者:“http://example.com/validateResetPassword/dsfsdfsd”
【问题讨论】: