I am new to nginx server. I have want to send my request of
http://localhost:81/app/get/all
to
http://localhost:9000/abc/get/all
I have using location regex. But it not working can any one help me.
I have add server as:
upstream dev {
server 127.0.0.1:9000;
}
server {
rewrite_log on;
listen [::]:81;
server_name localhost;
location / {
root path;
index index.html index.htm;
}
location ~ ^/app/.+ {
proxy_pass http://dev;
proxy_set_header Host $http_host;
}
}
Please help me.