LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-12-2010, 06:09 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
4 websites on different IP how to host them using apache2 mod_proxy newbie question.


Dom0 is having public IP.
I read a lot of blog and tutorials about name based and IP based hostings and also about mod_proxy.
But I am unable to do.
Here is what I am trying to do.
I have a webserver on public IP.Which is running Xen on it.

There are 4 Guest Operating systems installed on top of Dom0
which are Dom1,Dom2,Dom3,Dom4
These are application servers which are going to serve the requests that come from the main server.Which is Dom0.

I right now have no clue.
All I see is "It works" on all 4 of the hosts.
On my LAN on any machine on same subnet if I do
http://Ip of Domu1
message comes
Code:
It Works
.
Same thing happens with remaining 3 DomU's.
http://IP of DomU2
http://Ip of Domu3
http://Ip of Domu4
in browser from LAN gives me a message
Code:
It works.
What do I need to do on Dom0 so that requests are forwarded to the appropriate DomUs apache2 is running on all of them including Dom0.Some one suggested me to go for ReverseProxy in Apache2
How should I go for it some one suggest some thing.

Last edited by tkmsr; 04-12-2010 at 07:59 AM.
 
Old 04-12-2010, 08:01 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You should setup apache at dom0 to run as a reverse proxy for the backend web servers.
Read this for more details.

Regards
 
Old 04-12-2010, 08:27 AM   #3
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Blog Entries: 7

Rep: Reputation: 18
Hi,

The default path of index.html file is /var/www.

In the apache configuration file this path is mentioned as "Document Root /var/www", so that the apache service listens to the given path and displays the index.html file when requested through browser. it displays the same page i.e. It Works for all the domains when requested through browser.

so you can create directories e.g. /var/ww1,/var/www2 and /var/www3 and you can place your index.html file for each domain in those three directories.

And you should also mention that path in apache configuration file. so that when requested through browser apache fetches the index.html file for each domain from a different location.
 
Old 04-13-2010, 12:46 PM   #4
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Quote:
Originally Posted by bathory View Post
Hi,

You should setup apache at dom0 to run as a reverse proxy for the backend web servers.
Read this for more details.

Regards
Hi thanks this worked.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Apache2 - virtual host defaulting to default host slimjim Linux - Server 1 10-31-2009 01:47 AM
mod_proxy under Apache2 not working with some https sites pmvp5 Linux - Server 0 10-10-2008 04:54 AM
mod_proxy question izghitu Linux - Software 0 01-19-2007 08:55 AM
Apache2 and mod_proxy Maniac0Maniac Linux - Software 3 04-17-2006 06:51 PM
apache2 mod_proxy - swiki bkeating Linux - Software 0 10-28-2003 04:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration