我正在尝试通过代理传递在 nginx 中执行 auth_request,但我不断收到:
1 auth request unexpected status: 301
这是我的配置:
server {
listen 8080;
server_name localhost;
location /my_location/ {
auth_request /access/auth;
try_files $uri =404;
}
location /access/auth/{
proxy_pass http://localhost:5029/server_alias/web_service_name;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
请求应该被发送到正在监听端口 5029 的 apache 服务器。我做错了什么?