我有以下的nginx配置:
当我按下时:
我的实际输出是:
http {
log_format upstream_logging '[proxied request] '
'$server_name$request_uri -> $upstream_addr';
access_log /dev/stdout upstream_logging;
server {
listen 80;
server_name localhost;
location ~ /test/(.*)/foo {
proxy_pass http://127.0.0.1:3000/$1;
}
}
}
当我按下时:
http://localhost/test/bar/foo
我的实际输出是:
[proxied request] localhost/test/bar/foo -> 127.0.0.1:3000
我的预期输出是:
[proxied request] localhost/test/bar/foo -> 127.0.0.1:3000/bar
在日志中有没有变量或方法可以生成实际代理的URI?