Question
How to config nginx for multiple nodejs apps?
i just config nginx like this
server {
listen 80;
server_name mydomain.com www.mydomain.com;
location / {
proxy_pass http://167.172.192.169:7000;
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;
}
}
server {
listen 80;
server_name app.mydomain.com;
location / {
proxy_pass http://167.172.192.169:38453;
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;
}
}
i want sudomain app run in other node app
but i still get stuck here, did i need config and DNS ???
pls help
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×