how to run httpd on all the Alias IPs ???

Opesh Alkara opeshalkara at yahoo.com
Tue Feb 15 15:20:37 UTC 2005


Hi All,

Please suggest me how to run httpd on Alias IPs. 

Any help will be highly appreciated....

I am running apache 2.0.40 on RHEL 3.0 for practice
over my LAN. I have configured apache by editing
httpd.conf file. The IP address assigned to eth0 i/f
is 192.168.2.49 and the aliases are as follows:

192.168.2.41 --> eth0:1
192.168.2.42 --> eth0:2

and so on upto 192.168.2.46 --> eth0:6 

The main eth0 IP (192.168.2.49) maps to my local test
domain www.opeshalkara.com. All the domains are mapped
in following fashion:


192.168.2.49 --> eth0 --> www.opeshalkara.com --> doc
root : /home/opesh/www/site/

########## Above is the main eth0 interface
###########

########### Below are the IP aliases #################

192.168.2.41 --> eth0:1 --> www.opeshalkara1.com -->
doc root : /home/opesh/www/site1/

192.168.2.42 --> eth0:2 --> www.opeshalkara2.com -->
doc root : /home/opesh/www/site2/

and so on.....upto 192.168.2.46.......

all the permissions realted files and folders
including document roo have been changed to user
"apache" and 755.

Even after configuring the IP based virtual
hosting....httpd service is listening only for
192.168.2.49:80......(as i see from netstat -an
command)....DNS settings are also working fine as I
can ping and telent the domains www.opeshalkara.com,
www.opeshalkara1.com, www.opeshalkara2.com etc on port
no 53..... from local and remote machines. I want to
make the httpd service listen to all the IPs from:
192.168.2.41 to 192.168.2.46 so as to have dedicated
web servers handling each domain. I have attached the
screen shot of the  error I am getting and the scrap
of my configuration file is here:-

  
listen www.opeshalkara.com:80
  
ServerName 192.168.2.49
  
  
<IfModule mod_dir>
  
<VirtualHost www.opeshalkara.com:80>
    DocumentRoot "/home/opesh/www/site/"
    ServerName www.opeshalkara.com
    ErrorLog logs/opeshalkara.com-error_log
    TransferLog logs/opeshalkara.com-access_log
    DirectoryIndex index.html
 
</VirtualHost>
  
######## Above domain works fine ##################

########## problem begins here ####################
  
listen www.opeshalkara1.com:80
  
ServerName 192.168.2.41
  
  
<VirtualHost www.opeshalkara2.com:80>
    DocumentRoot "/home/opesh/www/site1/"
    ServerName www.opeshalkara1.com
    ErrorLog logs/opeshalkara1.com-error_log
    TransferLog logs/opeshalkara1.com-access_log
</VirtualHost>
  
  
listen 192.168.2.42:80
  
ServerName 192.168.2.42
  
  
<VirtualHost 192.168.2.42:80>
    DocumentRoot "/home/opesh/www/site2/"
    ServerName www.opeshalkara2.com
    ErrorLog logs/opeshalkara2.com-error_log
    TransferLog logs/opeshalkara2.com-access_log
</VirtualHost>
  
listen 192.168.2.43:80
  
ServerName 192.168.2.43
  
  
<VirtualHost 192.168.2.43:80>
    DocumentRoot "/home/opesh/www/site3/"
    ServerName www.opeshalkara3.com
    ErrorLog logs/opeshalkara3.com-error_log
    TransferLog logs/opeshalkara3.com-access_log
</VirtualHost>
  
listen 192.168.2.44:80
  
ServerName 192.168.2.44
  
  
<VirtualHost 192.168.2.44:80>
    DocumentRoot "/home/opesh/www/site4/"
    ServerName www.opeshalkara4.com
    ErrorLog logs/opeshalkara4.com-error_log
    TransferLog logs/opeshalkara4.com-access_log
</VirtualHost>
  
listen 192.168.2.45:80
  
ServerName 192.168.2.45
  
  
<VirtualHost 192.168.2.45:80>
    DocumentRoot "/home/opesh/www/site5/"
    ServerName www.opeshalkara5.com
    ErrorLog logs/opeshalkara5.com-error_log
    TransferLog logs/opeshalkara5.com-access_log
</VirtualHost>
  
listen 192.168.2.46:80
  
ServerName 192.168.2.46
  
  
<VirtualHost 192.168.2.46:80>
    DocumentRoot "/home/opesh/www/site6/"
    ServerName www.opeshalkara6.com
    ErrorLog logs/opeshalkara6.com-error_log
    TransferLog logs/opeshalkara6.com-access_log
</VirtualHost>
  
</IfModule>


Please suggest where I am going wrong

Thanks in advance !!!!!

Regards

Opesh Alkara


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 


More information about the redhat-list mailing list