【发布时间】:2020-03-06 10:54:23
【问题描述】:
我想使用 nginx 反向代理将传入的 http 请求路由到本地端口 8081,但在 8081 上运行的应用程序需要 www-authenticate 标头授权,邮递员给我状态 401“身份验证失败”(图 1)。但是当我使用 Apache httpd 进行反向代理时,我成功获得了结果。
这是我的 nginx.conf
location /webfolder/ {
proxy_pass http://localhost:8081;
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
请帮我解决这个问题,因为我不熟悉 nginx,nginx 版本 1.16
【问题讨论】:
标签: nginx centos7 nginx-reverse-proxy openresty www-authenticate