Using WHM Plugin and got redirected to port 80

Discussion in 'Apache Migration/Compatibility' started by aprasmac, Feb 2, 2009.

  1. aprasmac

    aprasmac New Member

    Hi All,

    I installed LSWS and can access my domain (http://domain.com:8088. When i was trying the WHM plugin, i clicked the "Switch to LiteSpeed". Not sure whether i restarted the LSWS service or not, but after that when i access http://domain.com:8088 it's always redirected to http://domain.com/ (without the 8088 port).

    I do curl -I http://domain.com:8088 i get

    HTTP/1.1 301 Moved Permanently
    X-Powered-By: PHP/5.2.8
    X-Pingback: http://domain.com/xmlrpc.php
    Content-Type: text/html; charset=UTF-8
    Location: http://domain.com/
    Content-Length: 0
    Date: Mon, 02 Feb 2009 08:22:03 GMT
    Server: LiteSpeed
    Connection: Keep-Alive
    Keep-Alive: timeout=5, max=100

    and here's the log:

    220.255.33.89 - - [02/Feb/2009:15:12:49 +0700] "HEAD / HTTP/1.1" 301 - "-" "curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3"


    Clicking "Switch to Apache" doesn't change anything back to as it was. I check the listener tab and rewrite tab and found nothing changed. Please help.

    Thanks,

    Aprasmac
  2. mistwang

    mistwang LiteSpeed Staff

    LiteSpeed will not do that by itself, must be some rewrite rule or the php code doing that.
    You can use the WHM plugin when let LSWS to read Apache configuration file directly. If you configure vhosts in LSWS web console natively, it wont work properly.
  3. aprasmac

    aprasmac New Member

    How to uninstall the WHM plugin?

    Thanks,
  4. mistwang

    mistwang LiteSpeed Staff

    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/lsws_whm_plugin_uninstall.sh
  5. aprasmac

    aprasmac New Member

    Too late, i ran this

    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh

    And i'm having a nightmare. Here's the output when i ran that:

    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh
    sh: ./chkLSRunning.sh: No such file or directory

    Uninstalling rc scripts ...
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 44: /admin/misc/rc-uninst.sh: No such file or directory

    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 50: [: !=: unary operator expected
    keep /conf untouched
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 58: [: !=: unary operator expected
    keep /logs untouched
    removed /add-ons
    removed /admin
    removed /autoupdate
    rm: cannot remove `/bin/zcat': Operation not permitted
    rm: cannot remove `/bin/tar': Operation not permitted
    rm: cannot remove `/bin/gunzip': Operation not permitted
    rm: cannot remove `/bin/gzip': Operation not permitted
    removed /bin
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 75: rm: command not found
    removed /DEFAULT
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 77: rm: command not found
    removed /docs
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 79: rm: command not found
    removed /fcgi-bin
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 81: rm: command not found
    removed /lib
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 83: rm: command not found
    removed /php
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 85: rm: command not found
    removed /phpbuild
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 87: rm: command not found
    removed /share
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 89: rm: command not found
    removed /LICENSE*
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 91: rm: command not found
    removed /VERSION
    is not empty, kept there
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 107: rm: command not found
    LiteSpeed Web Server has been successfully uninstalled.

    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: line 119: mv: command not found
    /usr/local/cpanel/whostmgr/docroot/cgi/lsws/cPanelUninstall.sh: /sbin/service: /bin/sh: bad interpreter: No such file or directory


    As you can see, the damage is at least, /bin is removed. How on earth this script would do like that? Please tell everyone not to use this plugin EVER again!!! How i'll recover from this disaster?

    Thanks,

    Apras
  6. mistwang

    mistwang LiteSpeed Staff

    You are not suppose to run that script from command line.

    If your server is a vps, the fix is relatively easy, just let the server admin to copy bin/ directory back. If you have a dedicate server, need to boot the server with a rescue disk and copy it back.
  7. aprasmac

    aprasmac New Member

    The server won't be able to fully recovered, not only /bin has gone, /usr/bin and /sbin have also vanished because of the script.

    If the script is not supposed to be executed from the command line, then it should have something to prevent because it's extremely dangerous!! Or, at least, put it on the README file. I'd strongly warn anyone about this.
  8. anewday

    anewday Moderator

    Wow, I'm sorry to see this happen on your server. :eek: Now, I have to be extra careful not to mess with this plugin. :confused:
  9. MikeDVB

    MikeDVB New Member

    I would just like to add that the WHM Plugin for cPanel/WHM has nothing to do with :8088 redirecting to port 80 - whether or not the plugin was installed this behavior would still occur as there is/was something else that was causing this redirect - as mistwang said it's either a script or a .htaccess directive such as mod_rewrite.

Share This Page