Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Unbinding an IP address from Apache

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

  1. webkar

    webkar Active Member

    Joined:
    Mar 25, 2002
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    306
    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:
    166
    Location:
    India
    In the httpd.conf the "ServerName" and the "NameVirtualHost" parameters helps to bind it to a particular IP.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. panayot

    panayot Well-Known Member

    Joined:
    Nov 18, 2004
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    166
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. webkar

    webkar Active Member

    Joined:
    Mar 25, 2002
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    306
    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:
    126
    Likes Received:
    0
    Trophy Points:
    166
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. saj

    saj Member

    Joined:
    Nov 6, 2004
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    151
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice