I have two react.js apps running on two different ports. App1 on port 3000 and App2 on port 3001.
App2 should be served at http://localhost:8000/nest/dataviewer/2597/data/2490
and App1 should be served in all other cases.
My nginx configuration :
server {
listen 8000;
gzip on;
gzip_types text/plain application/xml;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
satisfy any;
index index.html index.htm;
location ~* (^nest/dataviewer) {
proxy_pass http://127.0.0.1:3001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
#proxy_set_header X-Forwarded-Proto $scheme;
}
location ~* {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $remote_addr;
}
}
with the above configurations I’m not able to run the app2 at http://localhost:8000/nest/dataviewer/2597/data/2490
:
This is the warning I’m getting and no pages are loaded.
proxyConsole.js:56 Warning: [react-router] Location "/nest/dataviewer/2597/data/2490" did not match any routes