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... www.domain.com/cpanel doesn't work!

Discussion in 'General Discussion' started by hostingtruth, Aug 3, 2004.

  1. hostingtruth

    hostingtruth Member

    Joined:
    Jun 6, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    We recently moved all accounts to a new server and suddenly none of the accounts are able to access cPanel or WHM at:

    http://www.domain.com/cpanel

    or

    http://www.domain.com/whm

    The error message returned by the browser is: "The requested URL /cpanel was not found on this server."

    Using http://....:2082 and http://....:2086 still works fine.

    Any ideas?

    Also, it may be totally unrelated, but the counter is no longer working either. When attempting to create a counter, I get the message, "The requested URL /cgi-sys/countedit.cgi was not found on this server."

    It almost sounds like there is a PATH variable set wrong or something. Please help if you can.

    Thanks in advance,
    Scott
     
  2. atul

    atul Well-Known Member

    Joined:
    May 6, 2004
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Need some info !!!

    Hello ,
    Which OS ?what version of OS? What version of WHM?
    Generally this is cpanel error !!
    IF ur cpanel is n't upgraded to latest
    then do this:
    ssh to serevr as root
    then:
    #/scripts/upcp

    When finished
    u will be able to access it as http://www.domain.com/cpanel
    Best of luck !!!
     
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Known thing! Easy fix!!

    chgrp wheel /usr/local/cpanel/cgi-sys/*.cgi

    Done!
     
  4. hostingtruth

    hostingtruth Member

    Joined:
    Jun 6, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Atul:

    Linux
    Fedora Core 1
    WHM version 9.4.0
    cPanel 9.5.0-E4

    dgbaker:

    I saw a previous post where you said to do that, so that is what I tried first. But it didn't seem to make any difference. Would I need to restart any services for it to take effect? I checked that directory before running the chgrp command, and it only appeared that there was one file that didn't already belong to group wheel.

    Thanks for your help. Any other ideas?

    Scott Henry
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Hmm, does the redirects in apache httpd.conf exist?

    ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
    ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
    ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAlias /controlpanel /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAlias /securecontrolpanel /usr/local/cpanel/cgi-sys/sredirect.cgi
     
  6. hostingtruth

    hostingtruth Member

    Joined:
    Jun 6, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I checked httpd.conf, and all those ScriptAlias commands are present.

    I double-checked all the scripts in the cpanel cgi-sys directory, and everything is owned by wheel.

    I can't imagine what it would be.

    Thanks for your assistance, dgbaker. Would appreciate you sharing any other ideas if you think of any.

    Best regards,
    Scott Henry
     
  7. daWeazy

    daWeazy Member

    Joined:
    Jan 1, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California
    I am having the exact same issue. I copied accounts from a redhat 8 cpanel box to a fedora core 2 machine. Everything works but this. Keep us posted.
     
  8. hostingtruth

    hostingtruth Member

    Joined:
    Jun 6, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Well, here is the deal. I upgraded to the latest cPanel release and rebuilt Apache, and all is now well. The /cpanel and /webmail aliases work fine. And the scripts all work now. Guess I should have tried that first, eh?

    You might try that, daWeazy. God luck. :)

    Scott
     
  9. daWeazy

    daWeazy Member

    Joined:
    Jan 1, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California
    wierd.. I am running the latest cpanel RELEASE build, ran /scripts/rebuildhttpd and still not working. hrmmmmm
     
  10. daWeazy

    daWeazy Member

    Joined:
    Jan 1, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    California
    So rebuild apache with the "Update Apache" link as well. Still same issue :(

    This only goes for sites that i have moved from another cpanel server. New sites I add work fine. GO FIGURE!
     
  11. aphexer

    aphexer Member

    Joined:
    Aug 3, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    suexec problem

    I think this is a suexec problem. Can you check in whm under 'update apache', hit 'load previous config' and then tell me if suexec is checked or not and phpsuexec. When you have suexec installed wihtout phpsuexec you would get an internal server error (500) when trying to use the /cpanel or /whm links.

    To solve it you have to remove the suexec module OR you could install the phpsuexec. I don't recommend any option. Removing suexec will make your system much less secure (all .cgi run as same user, nobody) and installing phpsuexec will cause your apache install to not read certain php options from .htaccess anymore which causes some programs to fail. (you can fix this last one by putting these things into a php.ini).

    This is what my experience and reading learned me. Please give some feedback about this.
     
  12. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    There should be no issue with phpsuexec and suexec for this. /cpanel and /webmail and /whm are just redirects to the cpanel cgi's in most cases it is permissions of those cgi's or the ScriptAliases in httpd.conf.

    You do not need both phpsuexec and suexec for these to work.
     
  13. Almighty

    Almighty Member

    Joined:
    Apr 20, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Run /scripts/upcp and all should be well
     
  14. aphexer

    aphexer Member

    Joined:
    Aug 3, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    do is suexec problem

    Run ls -l /usr/local/cpanel/base/*.cgi => you'll see all cgi's are owned by root:wheel with permissions 755 except the resetpass one. Doesn't matter much though. In the apache suexec page (http://httpd.apache.org/docs/suexec.html) there is a list of conditions to meet so that a cgi will get executed useing suexec, number 18:

    18# Is the target user/group the same as the program's user/group?

    =>Is the user the owner of the file?

    In your httpd.conf you can check with each virtualhost that there is a 'User' directive. This is the so-called target user. For example user test1 operates test1.com. test1 is the target user. Now what was the owner of those cgi's? it was root:wheel. Is this a reason for it failing? Yes it is.

    If you don't have the User derictive in your httpd.conf it will not try to change the username and use the default one (nobody) which will faill to execute that cgi too, as far as I know, didn't try.

    If you think then why not chown test1:test1 *.cgi, well then www.test1.com/cpanel would work but anyotherdomain/cpanel would still give an error...
     
  15. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    That is not reason as we have no issues with the current setup on our severs or anyone elses that we know of. Those permissions have been like that from day one.
     
  16. aphexer

    aphexer Member

    Joined:
    Aug 3, 2004
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    doesn't matter how they have been earlier, the fact is that the apache docs say your configuration will _not_ work.
     
  17. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Whatever you say, you obviously do not know how things work with cPanel and I am not about to get into an issue with you. I suggest you open a ticket with cPanel if want further clarification on how things work. That fact is that with cPanel servers the setup works just fine and in all the cases that we have seen that have had issues it has been the wheel group ownership or chmod being wrong.

    I suggest you also look at how cpanel has implemented certain things like suexec (among other things), cPanel for example calls a proprietery cgi wrapper that handles the ownership issues. See /scripts/initsuexec script for some hints.
     
Loading...

Share This Page