2

I just got a linode account and some domain names. With these raw materials in hand, here is what I'd like to do:

example.com        -- static hosting
gitlab.example.com -- install gitlab here
dev.example.com    -- be able to install ruby stuff here
another-domain.com -- run a node server from here
third-domain.com   -- run another node server from here

I only have experience with Apache, but I don't know how to integrate Apache with Node. But really, I'm wondering what is the best way to do this?

Don't worry about whether I know the technology or not -- I'll learn it!

1 Answers1

3

Use some sort of reverse proxy as the "front end" to all of these services. If you're familiar with Apache, then use mod_proxy. If you're willing to learn nginx, though, that would likely be a better choice as it's much more lightweight.

Point all of your subdomains at your nginx instance, and configure each of your various daemons to listen on different ports. Then configure vhosts in nginx to proxy requests to the appropriate port on localhost.

For instance, let's consider your node instance for another-domain.com. Have that node instance listen on localhost:10888. Point another-domain.com to the IP address of your linode, and configure a vhost in nginx to proxy requests for another-domain.com to localhost:10888.

EEAA
  • 109,363
  • 18
  • 175
  • 245