Better you use subdomains, have DNS point to your server and use ngnix as proxy.
I’ve used it like this:
- site1.com -> Node running local -> //127.0.0.1:4000
- site2.com -> Node running local -> //127.0.0.1:5000
In the archive /etc/Nginx/sites-enabled/site1
server {
listen 80;
server_name site1.com;
access_log /var/log/nginx/site1.access.log;
location / {
proxy_pass http://127.0.0.1:4000/;
}
}
In the archive /etc/Nginx/sites-enabled/site2
server {
listen 80;
server_name site2.com;
access_log /var/log/nginx/site2.access.log;
location / {
proxy_pass http://127.0.0.1:5000/;
}
}
In case you just have to use, website with., and blog.site.com ;)
You can put in your question how is your Nginx configuration file?
– Leonel Sanches da Silva