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

From: Opesh Alkara (opeshalkara_at_yahoo.com)
Date: 02/15/05

  • Next message: Manuel Arostegui Ramirez: "Re: how to run httpd on all the Alias IPs ???"
    Date: Tue, 15 Feb 2005 07:20:37 -0800 (PST)
    To: redhat-list@redhat.com
    
    
    

    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

    
    

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: Manuel Arostegui Ramirez: "Re: how to run httpd on all the Alias IPs ???"

    Relevant Pages

    • Re: how to run httpd on all the Alias IPs ???
      ... > Please suggest me how to run httpd on Alias IPs. ... > hosting....httpd service is listening only for ... > ServerName www.opeshalkara.com ...
      (RedHat)
    • Re: apache2 Virtual Host configuration
      ... This means that you have defined NameVirtualHost www.domain.com:80 ... without a VirtualHost definition. ... on all IPs and you got only one IP you're listening on taht IP. ... # The ServerName Switch is used to direct Apache to the right Website. ...
      (comp.os.linux.setup)
    • IP Virtual Hosting and SSL
      ... sites, a production and a dev site, on one apache instance. ... NameVirtualHost 1.1.1.1:80 ... ServerName www.mysite.com ... no listening sockets available, shutting down ...
      (comp.lang.javascript)
    • Re: [DBNETLIB]ConnectionWrite (send()) error
      ... In the servername box, instead of SERVERNAME use ... SQL server listening on TCP, Shared Memory, Named Pipes. ...
      (microsoft.public.sqlserver.connect)
    • Re: Please HELP!
      ... > overwritten -- Unclean shutdown of previous Apache run? ... > AddType application/x-compress .Z ... > AddType application/x-gzip .gz .tgz ... > ServerName "www.domain1.com" ...
      (freebsd-questions)