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.

SSL /cpanel redirect not working on some domains - Suexec error

Discussion in 'General Discussion' started by jonasplus, Feb 29, 2008.

  1. jonasplus

    jonasplus Registered

    Joined:
    Jun 7, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    hope somebody can help me here....

    I've got my VPS set up one one IP and run some domains on that vps IP, while hosting some domains on other IPs.
    Recently the /cpanel, /webmail etc. SSL redirects stopped working on all domains, that are hosted on the vps IP!

    On my domains with different IPs I can use https://www.domain.com/cpanel, which then redirects me to https://vps.hostingdomain.com:2083 (I set cpanel to redirect to SSL hostname).
    But on the domains on the VPS IP, the redirects aren't working any more.

    Here's what I found:

    My suexec_log shows this error:
    uid: (99/nobody) gid: (99/99) cmd: redirect.cgi
    cannot run as forbidden uid (99/redirect.cgi)

    All the permissions in /usr/local/cpanel/cgi-sys/ are set like this:
    -rwxr-xr-x 1 root wheel 2892 2006-12-21 23:08 randhtml.cgi-wrap
    -rwxr-xr-x 1 root wheel 25 2006-03-22 23:15 realhelpdesk.cgi
    -rwxr-xr-x 1 root wheel 16 2008-02-07 10:25 realsignup.cgi
    -rwxr-xr-x 1 root wheel 152 2007-06-06 02:56 redirect.cgi
    I presume that should be correct.

    When I disable suexec, the redirects work fine again!

    WHM 11.15.0 cPanel 11.18.1-R20683 FEDORA 8 i686 on xen - WHM X v3.1.0
    Apache 2.2, but also tried with 2.0 with the same results.
    The error is really strange, because it only occurs on my vps IP....

    I'd like to use suexec, any suggestions how to fix this redirect issue?
     
  2. jdlightsey

    jdlightsey Perl Developer III
    Staff Member

    Joined:
    Mar 6, 2007
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Houston Texas
    cPanel Access Level:
    Root Administrator
    If you check your httpd.conf, you'll probably find that the VirtualHost is question has the user and group for Suexec set to 'nobody'. Apache's Suexec doesn't like this and cPanel builds numbered 20687 and higher have a fix to address this problem.

    If you'd like to do a quick test, turn on Suexec using the PHP and Suexec config tool, comment out the Suexec user and group line or lines from that VirtualHost in httpd.conf, restart Apache and try the redirect scripts again. If that fixes your problem you'll need to either wait for the fix to be published in Stable and Release, or switch to Current. Once you're on a branch of cPanel that has the fixed templates, just run /scripts/rebuildhttpdconf and restart Apache.
     
  3. jonasplus

    jonasplus Registered

    Joined:
    Jun 7, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Great!
    Thanks a lot, that did it.

    Will rebuild the httpdconf as soon as the release branch is updated >20687.
     
Loading...

Share This Page