Share one IP for separate webservers for separate domains

I'm looking into sharing a single IP for multiple webservers on separate (virtual) computers. Every time my webserver has issues, I wish I had a backup - but it doesn't quite make sense for the 98% of the time that there are no issues...

Anyway, this might be useful if I decide to provide a clustered node on my development (i.e. home) network.

From:

http://openacs.org/forums/message-view?message_id=31394

Posted by:
Posted by Ivan Histand on 03/31/02 01:56 PM


"Apache works, as advertised. I simply set up an httpd listening on port 80, and used the NameVirtualHost directive as per the examples here: http://httpd.apache.org/docs/vhosts/examples.html This was a last resort for me because It seemed dumb to have to set up two brands of http servers to do what seemed like a simple task, but I guess that's life.

So my final configuration is:
- All domains have DNS entries pointing to the same IP
- Apache listens on port 80 and proxies via VirtualHost
- Each domain has it's own nsd/oacs instance, listening on localhost:81, localhost:82 etc.


NameVirtualHost 1.2.3.4

ServerAdmin webmaster@domain1.com
ServerName domain1.com
ServerAlias *.domain1.com
ProxyPass / http://localhost:81/
ProxyPassReverse / http://localhost:81/
ErrorLog logs/domain1.com-error_log
CustomLog logs/domain1.com-access_log common


ServerAdmin webmaster@domain2.com
ServerName domain2.com
ServerAlias *.domain2.com
ProxyPass / http://localhost:82/
ProxyPassReverse / http://localhost:82/
ErrorLog logs/domain2.com-error_log
CustomLog logs/domain2.com-access_log common
"


tags: proxy, vps, shared, domain
Related Scribbles:
  • Web Servers
  • Web Hosting


  • ID: 882
    Author:
    leonard
    Date Updated:
    2007-12-08 20:37:46
    Date Created:
    2007-12-08 20:36:54

    Edit

    Comments?
     >> Leonard Chan's Homepage  >> Scribble Web  >> Share one IP for separate webservers for separate domains
    leonard.lotus-land.ca is hosted by Perceptus Solutions Inc.