2

I have a small website and have a free (shared) web hosting package but I have recently created a node.js app and I want to purchase a cheap vps with a different web host for it. The vps plan has limited storage so I will still be dependent on the shared hosting plan.

It it even possible to do this? Let's say I have mywebsite.com using shared hosting and I want to host the specific page mywebsite.com/nodeapp on another web host with which I have purchased the vps. I can't seem to find this info anywhere and I would like to know before purchasing the vps. Thanks in advance for your answers.

2

A domain with the same A record can not be shared across multiple servers due to the limitations of DNS. However there are technologies and software that will allow you to overcome these issues, some include mounting the remote resources or using a reverse proxy.

Some methods to mount remote folders include:

  • Mounting the remote folder over SSH and SFTP using sshfs.
  • Mounting the remote folder over FTP using Mount curlftpfs.
  • Mounting the remote folder over Samba using cifs-utils.

Some guides on setting up a reverse proxy:

If you don't like the idea of setting up remote mounts then you could use a reverse proxy that will basically use two HTTPD to serve the content. I've included the guides because you will need a tutorial as setting up a reverse proxy isn't as simple as telling you do this, or that.

The other options:

  • Use a sub domain.
  • Host the one page on the same server.
  • thanks for the info. I think i'll avoid the complications of reverse proxy and stick with a sub domain – Jay Jul 10 '16 at 19:00
2

You can't do it with a single web page as DNS tells the webs where to find your domain and that page is part of the domain.

But you can do it with a subdomain nodeapp.example.com by changing the A record for the subdomain to the IP address of your VPS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.