I just installed mean stack app. I'm using nginx as a proxy for mean. Here is my config:
server {
listen 80;
server_name meanjstest.local;
location / {
proxy_pass http://10.250.0.100:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
When I ran mean app by meanjstest.local
. The browser responsed 502 Bad Gateway. But when I added port 3000
into url, it's ok. How can I remove port number in my url? Do you have any solution for me.
I'm using centos 7 on vagrant box. My vagrant public IP is: 10.250.0.100
. And when I access this IP, it response Welcome to nginx.... And the port number 3000
follow, it the same as meanjstest.local:3000