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.

Several Apache servers

Discussion in 'EasyApache' started by latpanel, Aug 23, 2004.

  1. latpanel

    latpanel Well-Known Member

    Joined:
    Jan 23, 2004
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    I can´t run a second Apache server.
    I called httpd with -f parameter and I put a new .pid file in the alternative conf file, but the new httpd process doesn´t run. And there is not any error message!!!

    I suspect on a CPanel "interference", but I'm not sure.

    Any idea?
    Thanks
     
  2. cPanelBilly

    cPanelBilly Guest

    cPanel will not 'interfear' with anoyhting else running. You however cannot have 2 instences of apache running on port 80
     
  3. latpanel

    latpanel Well-Known Member

    Joined:
    Jan 23, 2004
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Two instances of Apache: resolved

    Yes, it's possible to have two instances of Apache running in a computer. But it looks that CPanel need a server listening in 127.0.0.1 for geting server status.

    The method is build a config file for the second server and call the server with the -f parameter
    For example:

    /usr/local/apache/bin/httpd -f httpd-2.conf

    In this config file
    - you must a choose a pid file different of the one used by the main server. This is the file where httpd write its process id.
    - The server must listen at a diferent IP of the one used by the main server. Of course yu must have this IP up.

    So the main server must have two Listen sentences: one for the public IP and one for the localhost (server status read by whm)

    But both can listen at the same port (80 for instance).

    Thanks
     
  4. alexisb

    alexisb Active Member

    Joined:
    May 25, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    It's Not Working Yet

    Thank you very much, this is also my problem: Having 2 Apache instances running in the same server. One of them listening in some IP's and the other one in other IP's

    I just added this to the httpd.conf of the first Apache:

    Listen 127.0.0.1:80
    Listen x.x.x.x:80
    Listen y.y.y..y:80

    Being x.x.x.x and y.y.y.y the IP's to listen for.

    I included the 127.0.0.1 IP as you mentioned but after restarting WHM can't see Apache and tell me "Unable to retrieve apache status [an error or timeout occurred while processing this directive]"

    I can't access my web sites in this Apache either.

    Any other advice?

    Thanks
     
  5. alexaandru

    alexaandru Registered

    Joined:
    Mar 21, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have exactly the same problem. Adding the "Listen a.b.c.d:80" kills apache from the outside world. I cannot get a restart on WHM, I can get a restart on comand line, ps ax shows the processes are running, netstat -pevatun shows httpd is listening on the right interfaces, **however** from outside it looks dead. Browser won't work, telnet a.b.c.d 80 won't connect, it's not a firewall problem.

    If anybody could get 2 Apache servers running on a server with cPanel, I would really appreciate any tips.

    TIA,
    Alex
     
Loading...

Share This Page