1754379 Members
3345 Online
108813 Solutions
New Discussion

apche configuration!

 
ajay_34
Occasional Advisor

apche configuration!

Hi all,

I have 2 apache servers (192.168.1.1 and 192.168.1.2) in my network hosted on linux operation system
I have only one public ip address.(61.6.65.222->router-ip)
My router will divert all http requests to 192.168.1.1
That means http://61.6.65.222 will be http://192.168.1.1
I have 2 domain names. It.mydomain.com and hq.mydomain.com
So http://it.mydomain.com , http://hq.mydomain.com and http://61.6.65.222 all will point to 192.168.1.1 server.
That’s my setup.

Question 1.
But now I want to point http://hq.mydomain.com to 192.168.1.2 server
What configurations I have to make in 192.168.1.1 and 192.168.1.2?

Question 2
I want to use 2 ports ..80 and 8080
If I use http://192.168.1.1
That should use the document path as /var/www/html/it
If I use http://192.168.1.1:8080
That should use the document path as /var/www/html/hq

How to configure my virual hosts ?

Thanks in advance.

Ajay.
1 REPLY 1
Steven E. Protter
Exalted Contributor

Re: apche configuration!

Question 1.

Answer: You will need access to the data (the html pages) on the second machine. Then you will need the httpd.conf and other conf files. You may have to make adjustments if you have numeric ip addresses int he configuration files.

If this is apache 2, you can include port numbers in your virutalhost statements.


DocumentRoot /var/www/html/it
...
# other stuff




DocumentRoot /var/www/html/hq
...
# other stuff



SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com