例如客户端浏览器访问 http://my.com/abc/d.html 或者其他任何基于 my.com 下的路径,
将该路径转至 http://127.0.0.1:81/process.php?path=/abc/d.html 进行处理
我使用 proxy_pass 方法如下,确不生效:
server {
...
location / {
proxy_pass http://127.0.0.1:81/process.php?path=$1;
}
}
这个 $1 变量在 rewrite 指令后可代表 request path ,而 proxy_pass 下却不行呢,求教!
将该路径转至 http://127.0.0.1:81/process.php?path=/abc/d.html 进行处理
我使用 proxy_pass 方法如下,确不生效:
server {
...
location / {
proxy_pass http://127.0.0.1:81/process.php?path=$1;
}
}
这个 $1 变量在 rewrite 指令后可代表 request path ,而 proxy_pass 下却不行呢,求教!