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!

How to bind apache to one IP rather than all

Discussion in 'Bind/DNS/Nameserver' started by denisdekat09, Mar 20, 2007.

  1. denisdekat09

    denisdekat09 Well-Known Member

    Joined:
    Mar 2, 2002
    Messages:
    265
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    San Francisco
    Hello,

    I am trying to bind apache to listen to only one IP on the server rahter than all of them I believe this should be possible :)

    I am seeing this in the conf file:

    # BindAddress: You can support virtual hosts with this option. This directive
    # is used to tell the server which IP address to listen to. It can either
    # contain "*", an IP address, or a fully qualified Internet domain name.
    # See also the <VirtualHost> and Listen directives.
    #
    #BindAddress *


    Does anyone know if I set this to bind will it mess up virtual hosting? I looked arround in the apache site and was not too clear on what to configure.

    Or should it be the Listen and Port directives? I am seeign these:

    Port 80

    ##
    ## SSL Support
    ##
    ## When we also provide SSL we have to listen to the
    ## standard HTTP port (see above) and to the HTTPS port
    ##
    <IfDefine SSL>
    Listen 80
    Listen 443
    </IfDefine>


    Thank you :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    IIRC, you need to change the Listen directive so that instead of:

    Listen 80

    You have:

    Listen 11.22.33.44:80

    Then restart httpd. Where 11.22.33.44 is the IP address you want to listen on. It'll work so long as you obviously haven't got any domains using a different IP address than the one you're listening on.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. denisdekat09

    denisdekat09 Well-Known Member

    Joined:
    Mar 2, 2002
    Messages:
    265
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    San Francisco
    thanks chirpy you rock!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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