Using WHM Plugin and got redirected to port 80

#1
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
 

mistwang

LiteSpeed Staff
#2
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.
 
#5
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
 

mistwang

LiteSpeed Staff
#6
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
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.
 

MikeDVB

Well-Known Member
#9
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.
 
Top