DocumentRoot/path problem

#1
Hello,

I've recently switched from Apache to LiteSpeed Web Server. However, after switching to LiteSpeed, my sites have stopped working. I'm using cPanel on CentOS 5.5.

I checked the error logs and it seems as though my DocumentRoot has changed. The errors are similar to the one below:

[xxx.xxx.xxx.xxx:60411-0#APVH_xxx.xxx.xxx.xxx_host.name.com] File not found [/usr/local/apache/htdocs/images/logo.png]

Looks like it's trying to find files at /usr/local/apache/htdocs instead of /home/username/public_html/

Would you happen to know how to fix this issue?

Thank you!
 
Last edited:
#4
I've re-installed LiteSpeed again using that guide and the error is still the same. I've also tried uninstalling LiteSpeed + the WHM/cPanel plugin and re-installing again but it doesn't work either.

I changed the port offset to 2000 and Apache works fine but LiteSpeed doesn't. You can check it out here: :80 (Apache) and :2080 (LiteSpeed)

I'm using the 4 CPU Enterprise Edition of LiteSpeed.

Any ideas as to what the problem could be?

Thank you!
 
Last edited:

NiteWave

Administrator
#5
I tested 1 .js file:
http://46.4.95.1 4 5/~ih o neyd/components/com_zoo/assets/js/default.js
http://46.4.95.1 4 5:2080/~ih o neyd/components/com_zoo/assets/js/default.js

both are displaying fine.

the problem is when accessing 46.4.95.1 4 5:2080/~ih o neyd/, is 404 Not Found, and ~ih o neyd/ is removed from all subsequent request URLs. so above .js became 46.4.95.1 4 5:2080/components/com_zoo/assets/js/default.js, hence 404 Not Found error again, looks DocumentRoot changed as you reported.

2 questions:
1.how about other accounts?
2.how about 46.4.95.1 4 5:2080/~ih o neyd/phpinfo.php ? does it display correctly?
 
Last edited:
#6
Hi, you can test the phpinfo now. It works fine when you access that file.

As for other accounts, they have the same errors.

And could it be possible if you remove the live links to my server please? I just don't want it publicly displayed.

Thank you!
 

NiteWave

Administrator
#7
Hi, I've modified the URLs in my previous post following your way.

what's your litespeed version? and the time stamp of /usr/local/lsws/bin/lshttpd.4.x?
 
#8
My LiteSpeed version is 4.0.20, which was what the WHM/cPanel plugin installed. The timestamp of lshttpd.4.0.20 is 1186384 Apr 18 20:22.
 

NiteWave

Administrator
#9
forgot to mention: I confirmed both :80/~xxx/phpinfo.php and :2080/~xxx/phpinfo.php are working fine.

before the last resolution(login your server), can you try:

1.Force Reinstall 4.0.20 (in lsws admin web console)
2.Enable EasyApache Integration (cPanel lsws plug-in)
3.Build Matching PHP Binary
(even see "No action needed for PHP version 5.2.17" message, go ahead anyway)
4. after build done, restart lsws.
 
#10
Hi,

I've just performed all the steps listed above and it still isn't working. Apache works fine but LiteSpeed doesn't. Strange because LiteSpeed should be reading Apache's conf file so there shouldn't be a problem.

Would you like root access to the server?
 
#12
Hi,

I think I've figured out 50% of the issue.

if you access the site with domain name, it works just fine.

to verify this, edit your local hosts file(for example in windows,C:\WINDOWS\system32\drivers\etc\hosts), add
10.10.10.10 www.mysite.com
then access www.mysite.com in browser, all is ok.

per this example, the difference between apache and litespeed is:
10.10.10.10/~user/ working in apache, just like access www.mysite.com
however, not working with litespeed. either 10.10.10.10/~user/ or 10.10.10.10:2080/~user/
 
#13
Hmm.. it seems you are right. After adding an entry into the hosts file, everything seems to be working just fine.

Must be something to do with the configuration because my other server running LiteSpeed can access accounts using IP/~accountname just fine. Not sure what the problem here is though. Perhaps it could be that I'm using a shared IP, which is causing issues viewing IP/~accountname accounts.
 
#14
and IP/~user/phpinfo.php works with litespeed

further tests: IP/~user/index.php OK as well.
only IP/~user/ or IP/~user has big problem.
 
Last edited:
Top