Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
Do you have multiple IP addresses? –  Ignacio Vazquez-Abrams Jul 17 '12 at 3:14
    
@IgnacioVazquez-Abrams nope –  Robert Martin Jul 17 '12 at 4:24
add comment

1 Answer 1

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.

share|improve this answer
    
+1 I use nginx. It's pretty trivial to set up for node. –  Wes Freeman Jul 17 '12 at 4:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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