You'd better use subdomains, have DNS point to your server, and use ngnix as a 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 / 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 / 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 site.com , and blog.site.com ;)