Situation and problem
I have an Ubuntu Server 14.04 VPS, and want to host multiple sites on it, all with distinct domains:
- A wordpress installation (PHP + MySQL)
- A simple PHP site, no database
- A Discourse installation. Discourse is based on Ruby on Rails
Each site has a distinct domain name. When I search for multisite setups, I mostly find guides to specific servers, for instance how to setup multiple Discourse forums on a single server. I have a feeling this is really a common problem, I'm just asking the wrong question.
My current understanding of the problem is that
- A domain points to a single IP address
- A server can listen on a single port
- A server can retrieve the domain name from the request header
Solution?
This leads me to the impression that a solution could be
- A thin server listening on :80 and :8080 looks up domain name and delegates the request
- Each site runs on the server listening on other ports, and delivers the required site
Intuitively this seems like a basic problem
Questions
- Am I on the right track?
- Are there lighter alternatives to Apache for the delegation?