The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Unbinding an IP address from Apache

Discussion in 'Bind / DNS / Nameserver Issues' started by webkar, May 14, 2006.

  1. webkar

    webkar Active Member

    Joined:
    Mar 25, 2002
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I am trying to install and bind a thttpd on one of IP addresses on a server.

    Therefore I need to remove one of the IP addresses from Apache. But everything I do messes up the apache.

    Have someone done this in past? If so I'll appereciate if you can give me the exact changes I should do on my httpd.conf.

    Regards,
    Mac
     
  2. avijit

    avijit Well-Known Member

    Joined:
    Jul 26, 2004
    Messages:
    116
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    In the httpd.conf the "ServerName" and the "NameVirtualHost" parameters helps to bind it to a particular IP.
     
  3. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    In httpd.conf you should explicitly enumerate on what ips should apache listen:

    Code:
    Listen 127.0.0.1:80
    Listen 111.222.111.222:80 
    
    
    <IfDefine SSL>
    Listen 111.222.111.222:443
    </IfDefine>
    Apache will not respond to ip-s that you did not list and you can bind them to thttpd
     
  4. webkar

    webkar Active Member

    Joined:
    Mar 25, 2002
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Putting IP addresses results into below problem:

    [Wed May 17 20:19:32 2006] [error] VirtualHost x.x.x.114:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    [Wed May 17 20:19:32 2006] [error] VirtualHost x.x.x.114:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
    /etc/init.d/httpd: line 83: 20926 Terminated $HTTPD -DSSL
     
  5. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    For NameVirtualHost I have:

    NameVirtualHost 111.222.111.222:80
    ....
    (you enumerate all the ips from the Listen directives except for 127.0.0.1)


    And your virtual hosts should look like

    <VirtualHost 111.222.111.222>

    or if SSL:

    <VirtualHost 111.222.111.222:443>

    No * anywhere
     
  6. saj

    saj Member

    Joined:
    Nov 6, 2004
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Please double check your apache configuration file. Also check whether there are any include files and if so check that files too. Once I faced this issue and on checking I found a file /usr/local/apache/conf/test.conf included in to httpd.conf which was causing the problems.

    Best regards,
    Saj
     
Loading...

Share This Page