Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Quickfix for /cpanel and /webmail

Discussion in 'E-mail Discussion' started by dlorch, Jun 10, 2004.

  1. dlorch

    dlorch Member

    Joined:
    May 12, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    After having upgraded our servers because of the SuEXEC-bug the /cpanel and /webmail redirects wouldn't work anymore (because SuEXEC does not allow redirect.cgi and wredirect.cgi to be executed). Before starting to fiddle with SuEXEC I thought it would be easier to just implement this functionality in mod_rewrite so this is my quickfix:

    1. remove ScriptAlias /cpanel and ScriptAliasMatch /cpanel/(.*) (also for webmail)

    2. add

    RewriteEngine On
    RewriteLogLevel 0

    RewriteCond %{REQUEST_URI} ^/cpanel
    RewriteRule (.*) http://%{HTTP_HOST}:2082/ [R,L]

    RewriteCond %{REQUEST_URI} ^/webmail
    RewriteRule (.*) http://%{HTTP_HOST}:2095/ [R,L]

    does not work (yet) with SSL, but at least the basic functionality is provided until someone at cpanel fixes the actual problem.
     
  2. dlorch

    dlorch Member

    Joined:
    May 12, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    wait .. only works inside a virtualhost .. hmm
     
  3. dlorch

    dlorch Member

    Joined:
    May 12, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    "Note that, by default, rewrite configurations are not inherited. This means that you need to have a RewriteEngine on directive for each virtual host in which you wish to use it."

    http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteEngine

    aah sh*t. seems like i need to wait until this bug is fixed by cpanel.
     
  4. Servia

    Servia Active Member

    Joined:
    Jan 20, 2004
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Finland
    Is there a fix for this?
    I've posted couple of tickets to cPanel to solve this problem, but no luck yet... :eek:
     
  5. dlorch

    dlorch Member

    Joined:
    May 12, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    No (quick) solution that I would know of.
     
  6. brentp

    brentp Well-Known Member

    Joined:
    Mar 11, 2004
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Ayr, North Queensland, Australia
    make sure your /usr/local/apache/conf/access.conf says:

    I had a problem similar to that before and that was my fix

    Regards,
    Brent
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. meganet

    meganet Well-Known Member

    Joined:
    Mar 28, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    156
    I actually want to remove webmail redirect on a domain level - is that possible?
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice