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.

HELP - apache taking all IP's

Discussion in 'EasyApache' started by louisparks, Feb 15, 2005.

  1. louisparks

    louisparks Registered

    Joined:
    Nov 19, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Is there a way to keep apache from grabbing on to all the IP's assigned to my machine? I have another service that I want to run on port 80 for a specific ip on the machine. I have tried to put in Listen directive with the specific ip into /usr/local/apache/conf/httpd.conf but when I restart the server it tells me the address is already in use. Seems like something is binding to every possible address on the machine. I can't find the setting to limit it to specific IP's

    thanks in advance
     
  2. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Lets see.. what you want to do is use port 80 for 2 different applications.. is this correct?

    Its not the IP's that you will have trouble with, its the port usage with 2 applications :)
     
  3. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    I'm sure you can limit the ips that apache listens on... you'd better read the apache documentation.

    Apache is likely already set to listen on port 80 for every public ip address... so you'll likely need to add a config setting and specify exactly which ip addresses you want it to use. then restart apache. then you ought to have port 80 free for your other application.
     
  4. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    # 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 *

    change the bind address to the ip you want apache to listen on
     
  5. louisparks

    louisparks Registered

    Joined:
    Nov 19, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the responses.

    I do not want to run two services on one port on the same IP address. I want to run two different services on the same port on seperate ip addresses. I have no problem binding tomcat to a specific port on a specific ip but I am having problems with apache.

    example

    192.170.2.1 apache on port 80
    192.170.2.2 tomcat on port 80

    this should be possible. I have tried to put the followind into the conf file

    Listen 192.170.2.1:80

    but when I start apache with this line it tells me that the is already something on that port.

    I have tried all combinations of Listnen and Bind but apache continues to grab onto all the IP addresses. Is there another configuration file that I do not know of that will cause this behavior?
     
  6. alexisb

    alexisb Active Member

    Joined:
    May 25, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Did You Get This Working?

    I have the same problem.

    I read the documentation from Apache, I know I should be using "Listen" directive to do this, "BindAddress" can be used only once in httpd.conf but I need my Apache server to listen to 3 IP's so I put:

    Listen a.a.a.a:80
    Listen b.b.b.b:80
    Listen c.c.c.c:80

    a.a.a.a , b.b.b.b and c.c.c.c are my IP addresses.

    Then I restart Apache but when trying to access a web site I get "connection refused by server", WHM also shows Apache Status as not running.

    I read in these forums I should include 127.0.0.1 so I added:

    Listen 127.0.0.1:80

    to my httpd.conf but it didn't help.

    I need this done in order to run a second Apache server which will be listening at IP d.d.d.d, if I don't limit the IP's being listened to in the first Apache then the second one tells me "that IP is already used".

    Any ideas?

    Thanks!
     
  7. alexisb

    alexisb Active Member

    Joined:
    May 25, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I Resolved The Problem

    Hey, I did it, the problem was being caused by another Listen directive for SSL:

    Listen 443

    Which was using all IP's. Just specify the IP's you want to support SSL there and you are done :)

    Regards!
     
Loading...

Share This Page