【发布时间】:2021-01-27 15:44:34
【问题描述】:
我正在使用公共 URL 并将其添加到我的 Nginx 反向代理。我在运行 nginx.conf 配置文件时遇到了错误的请求错误。我有一个访问令牌也需要添加
下面是我的 nginx.conf 文件。
有什么建议吗?
worker_processes 1;
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name localhost 127.0.0.1;
client_max_body_size 0;
set $allowOriginSite *;
proxy_pass_request_headers on;
proxy_pass_header Set-Cookie;
# External settings, do not remove
#ENV_ACCESS_LOG
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
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_pass_header Set-Cookie;
proxy_set_header X-Forwarded-Proto $scheme;
location /test/ {
proxy_pass https://a***.***.com;
}
}
}
403 ERROR
The request could not be satisfied.
【问题讨论】:
标签: nginx web server nginx-reverse-proxy