我正在尝试让 nginx 通过
"your-domain.com/test"
至
http://localhost:{9001}
我是 nginx 新手,并在以下方面取得了成功:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:{9001};
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
}
}
现在我可以将我的域传递到端口 9001。现在我想以这种方式进行调整,我可以将 your-domain.com/test 传递给 localhost:{9001}。这可能吗?我必须改变什么?
我试过了
location /test
server_name your-domain.com/test
两者都没有成功。