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.

apache still listens on reserved IP

Discussion in 'EasyApache' started by aww, Oct 28, 2012.

  1. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    One of our servers has two IPs.

    I checked the 2nd IP as reserved (it's used for exim only)

    But apache still listens on that 2nd IP and responds at the server document root level (there are no sites assigned to that IP)

    Do I have to edit httpd.conf directly?

    whm 11.34

    - - - Updated - - -

    Sorry, nevermind, I see there is yet another UI under apache configuration for apache reserved.

    This is solved now (or feel free to delete the thread).
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    It's better to keep the thread for any future user who runs into the same issue so they know how it was resolved.
     
  3. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hmm you know what, it's still running apache on the 2nd IP that has been reserved. Apache restarted and it's still responding.

    Basically the reserved IP prevents users/accounts from being assigned the IP but it doesn't stop the IP from being listened to.

    Will have to manually edit httpd.conf? That seems annoying since cpanel will periodically overwrite it.

    Is it because of this?
    Code:
    
    # Default vhost for unbound IPs
    
    <VirtualHost *>
    
    Ohhh.... it's because of this

    Code:
    # Defined in /var/cpanel/cpanel.config: apache_port
    Listen 0.0.0.0:80
    
    Code:
        # Defined in /var/cpanel/cpanel.config: apache_ssl_port
        Listen 0.0.0.0:443
    
    I cannot be the first person who doesn't want apache running on extra IPs ?
    How is that possible? Why would cpanel default to binding on all IPs even if they are reserved in both apache reserved and system reserved?

    Anyway, can I edit /var/cpanel/cpanel.config or is cpanel going to overwrite it every time?

    Basically I need control over these two lines
    Code:
    apache_ssl_port=0.0.0.0:443
    apache_port=0.0.0.0:80
    
     
    #3 aww, Nov 1, 2012
    Last edited: Nov 1, 2012
  4. aww

    aww Well-Known Member

    Joined:
    Feb 10, 2005
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Looks like someone asked the same question back in 2008 without an answer

    http://forums.cpanel.net/f5/running-apache-two-ports-95317.html

    AHA!

    The setting is NOT in apache settings (because that would make too much sense).

    It's under Tweak Settings -> System

    Problem solved. Hope that helps someone in the future. Whew.
     
    #4 aww, Nov 1, 2012
    Last edited: Nov 1, 2012
Loading...

Share This Page