location/merchant/mangooda
rewrite /merchant/mangooda / break;
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://localhost:9001;
}
This is my nginx configuration. I want to get the localhost:9001 when I go to the server_name/merchant/mangooda. But now when I go to the 'server_name/merchat/mangooda', it's going to the localhost:9001/merchant/mangooda. This path does not exist in localhost:9001. So, I got 404 error. Can anyone fix my problem?
In case 'proxy_pass http://localhost:9001/', when I change the proxy_pass like this, url is working but it doesn't load CSS contents in my NodeJS app. only showing HTML pages.