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.

cpanelproxy

Discussion in 'General Discussion' started by k1k, May 10, 2007.

  1. k1k

    k1k Active Member

    Joined:
    Mar 24, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,
    I have updated the cPanel on some of my servers to version 11. Here is what I have found. The "cpanelproxy" is not working properly. All of the customers trying to access cpanel.servername or webmail.servername are redirected to the cpanel ports 2095/2096 and 2082/2083. Many of the users have filters for such ports and they are unable to use cpanel and webmail any more. The main purpose of the cpanelproxy is to provide us with access through port 80, but it seems that the cpanelproxy is not a solution for cpanel11.
    So I have a new cPanel and crying customers.I hope that the cPanel developers will find a solution for that case very soon. If you have another working solution , then it would be great if you could update this post.

    K.Kossev
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    cpanelproxy is a third party application. You need to address this concern to their developers at http://cpanelproxy.net or at http://sourceforge.net/projects/cpanelproxy
     
    #2 cPanelKenneth, May 10, 2007
    Last edited: May 10, 2007
  3. Kjette86

    Kjette86 Member

    Joined:
    Jun 18, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Why isn´t cPanel/WHM/Webmail running on like port80? Because too many have their ports blocked and it´s hard to go around if they are behind an proxy with only port 80/443 opened.
     
  4. scottc

    scottc Well-Known Member

    Joined:
    Apr 21, 2002
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    The problem is not with cpanelproxy. The cpanel 11 upgrade has disabled the use of 'webmail' as a subdomain. A workaround is to edit the cpanelproxy script and use a subdomain other than 'webmail'. I'm sure there is a better solution, probably involving editing httpd.conf...but then we might not be able to trust cpanel to leave it alone after it's edited.

    A really good solution would be for cpanel to offer a way to optionally give port 80 access to cpanel, webmail, and whm and thereby eliminate the need for cpanelproxy altogether.

    Scott
     
  5. k1k

    k1k Active Member

    Joined:
    Mar 24, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Solution

    The webmail problem was solved yeasily.The problem was in the scriptalias entry in the httpd.conf. It should be changed from "ScriptAlias /webmail" to "ScriptAliasMatch /webmail$". So it will work properly :)
     
  6. basix

    basix Member

    Joined:
    Dec 12, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    My subdomain has always been mail.x.com and still it doesn't work. I can't access the httpd conf right now but will certainly take a look at it tonight.
     
  7. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    Hmm there aint no ScriptAlias /webmail in /usr/local/apache/conf/httpd.conf. How did you manage to fix this in cPanel 11?
     
  8. silversurfer

    silversurfer Well-Known Member

    Joined:
    Dec 29, 2002
    Messages:
    274
    Likes Received:
    0
    Trophy Points:
    18
    The reason cpanel needs to run on a different port is that it is really a separate server of sorts, and thus needs its own port i.e. it's not a program running on top of apache and no 2 separate daemons can share a port. Cpanelproxy basically bridged that.

    Let me research this problem.
     
  9. rove

    rove Registered

    Joined:
    Aug 2, 2004
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Didn't work

    Editing cpanelproxy.php and changing the subdomain name didn't work, nor worked change .htaccess because after click on Horde link via port 80 is redirected to https://domain:2096.

    What could I do if I have no access to httpd.conf, mine is a shared server with no root access.

    Thanks
     
  10. ilizaran

    ilizaran Registered

    Joined:
    Jul 4, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    After update, you have new lines in your httpd.conf.

    Comments this lines:
    ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi

    if you can't edit httpd.conf, you have to use a different subdomain...

    Regards
     
  11. stevebor1

    stevebor1 Member

    Joined:
    Jan 17, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1

    Thank you. I have commented the 2 lines and restarted apache, now it works.

    Is there any disadvantage of commenting these lines out? And
    Do you think there will be a fix on the cpanelproxy side, or cpanel 11 side to resolve this issue?

    Thanks again!
     
  12. TechGuy

    TechGuy Well-Known Member

    Joined:
    Nov 29, 2001
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    It seems to cause users to no longer be able to go to {theirdomain}/webmail

    Is there some way around that?
     
  13. stevebor1

    stevebor1 Member

    Joined:
    Jan 17, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    hmm. I just noticed that problem too.
     
  14. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    /usr/local/cpanel/setupapache will add them as well
     
  15. TechGuy

    TechGuy Well-Known Member

    Joined:
    Nov 29, 2001
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    That won't break the "fix" of commenting them out? I'm tempted to try, but my customers are pretty frustrated with the back and forth as it is. ;)
     
  16. stevebor1

    stevebor1 Member

    Joined:
    Jan 17, 2004
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
  17. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    We could probably just setup some vhosts with mod_proxy after phase 2 .. would have to do some testing though.
     
  18. internetfab

    internetfab Well-Known Member
    PartnerNOC

    Joined:
    Feb 20, 2003
    Messages:
    336
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Gothenburg, Sweden
    cPanel Access Level:
    DataCenter Provider
    We updated 2 servers to cPanel 11 and realized that cPanelproxy wasn't working - since then we have shut down ALL updates on the rest of the servers until we find a fix for accessing webmail and control panel through port 80.

    This should be something the cPanel crew should prioritize.
     
  19. jeroman8

    jeroman8 Well-Known Member

    Joined:
    Mar 14, 2003
    Messages:
    410
    Likes Received:
    0
    Trophy Points:
    16
    Hi all!

    I just changed the:

    /usr/local/cpanel/cgi-sys/wredirect.cgi

    to a v10 cpanel wredirect.cgi file instead.
    All works ok here.

    It's not the ScriptAlias that has changed in httpd, it's the cpanel redirect script that
    has changed.

    PS: You need to chown the file to root:wheel also if you upload/create a new one.
    If you just edit the file it's ok.


    OLD wredirect:


    #!/usr/bin/perl -T

    use Sys::Hostname qw(hostname);

    my $rdhost = $ENV{'HTTP_HOST'};

    open(CPCONF,"/var/cpanel/cpanel.config");
    while(<CPCONF>) {
    next if (/^#/);
    s/\n//g;
    ($var,$value) = split(/=/, $_);
    $CPCONF{$var} = $value;

    }
    close(CPCONF);

    if ($port eq "") { $port = '2095'; }
    if ($sslport eq "") { $sslport = '2096'; }

    if (($ENV{'HTTPS'} eq "on" || $CPCONF{'alwaysredirecttossl'}) && $CPCONF{cpredirecthostname}) {
    $rdhost = hostname();
    }


    if ($ENV{'HTTPS'} eq "on" || $CPCONF{'alwaysredirecttossl'}) {
    if (${rdhost} ne "") {
    print "Location: https://${rdhost}:${sslport}\n\n";
    } else {
    print "Location: https://$ENV{'REMOTE_ADDR'}:${sslport}\n\n";
    }
    } else {
    if (${rdhost} ne "") {
    print "Location: http://${rdhost}:${port}\n\n";
    } else {
    print "Location: http://$ENV{'REMOTE_ADDR'}:${port}\n\n";
    }
    }
     
    #19 jeroman8, Jun 19, 2007
    Last edited: Jun 19, 2007
  20. UniSol

    UniSol Active Member

    Joined:
    Mar 5, 2004
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Works fine for me straight out of the .zip
     

Share This Page