DocumentRoot/path problem

Discussion in 'General' started by st2410, Apr 17, 2011.

  1. st2410

    st2410 Member


    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:

    [] 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: Apr 17, 2011
  2. NiteWave

    NiteWave Administrator

  3. mistwang

    mistwang LiteSpeed Staff

    I think you were using standard edition with 5 vhosts limits.
  4. st2410

    st2410 Member

    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: Apr 19, 2011
  5. NiteWave

    NiteWave Administrator

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

    both are displaying fine.

    the problem is when accessing 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 4 5:2080/components/com_zoo/assets/js/default.js, hence 404 Not Found error again, looks DocumentRoot changed as you reported.

    2 questions: about other accounts? about 4 5:2080/~ih o neyd/phpinfo.php ? does it display correctly?
    Last edited: Apr 18, 2011
  6. st2410

    st2410 Member

    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!
  7. NiteWave

    NiteWave Administrator

    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. st2410

    st2410 Member

    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.
  9. NiteWave

    NiteWave Administrator

    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. st2410

    st2410 Member


    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?
  11. NiteWave

    NiteWave Administrator

    OK. have to ... :) please PM me.
  12. NiteWave

    NiteWave Administrator


    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
    then access in browser, all is ok.

    per this example, the difference between apache and litespeed is: working in apache, just like access
    however, not working with litespeed. either or
  13. st2410

    st2410 Member

    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. NiteWave

    NiteWave Administrator

    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: Apr 18, 2011
  15. NiteWave

    NiteWave Administrator

    please test the latest 4.1, should fix it 100%.

Share This Page