I have an angular js application which is serving from a node server which is running a at locahost:8050. It's running fine when I hit localhost:8050. But I want that request will come to localhost:8050 through a proxy, so I have set up nginx like below:
server {
listen 80;
server_name ingl.sorc.com;
location /portal/gen/ {
proxy_pass http://localhost:8050;
}
}
and also make 127.0.0.1 ingl.sorc.com entry to the etc hosts file.
So when I am hitting ingl.sorc.com/portal/gen/ this URL it shows a blank page. It shows blank page because it try to get css and js file from "http://ingl.sorc.com/styles/vendor.a31e3c2d.css" and "http://ingl.sorc.com/styles/vendor.st34hj.js", those file eventually not exists in the particular path.
I am using grunt to build angular application. After build the application in index.html css and js are added to the page using relative path. For example :
<link rel="stylesheet" href="styles/main.46a5c195.css">
<script src="scripts/vendor.7925e705.js"></script>
Please help me. I have no idea how can I solve the problem.