Virtual Hosts & Additonal Websites

Discussion in 'Install/Configuration' started by capbiker, May 26, 2008.

  1. capbiker

    capbiker Active Member

    I am pretty new to litespeed, been configuring it the last few weeks for the VPS. And I am ready to upload my friend's website of which I am planning to host on my VPS in additional to my own website.

    I have just created a serperatle account for it through cpanel, and just uploaded the website to it's own section on the server. But now when I go to it nonthing is showing up. Most of the site is just html and I have got a feeling that I am missing something.

    Looking through the admin within litespeed, it looks like I have to set up a virtual host for the new website space that I have created? Is this right? If it is, can anybody point me to any insturctions telling me what goes where with it? Because when I searched the wiki it didn't have any much.

    Or am I complete wrong and I need to do something totally different to get my friend's website up and running?

  2. ffeingol

    ffeingol Well-Known Member

    If you are using cPanel you should not have to configure anything for the web site. LSWS should just be reading your httpd.conf which cPanel will update. Here is the entry from the wiki:

    You "might" just have to run:

    service lsws restart

    As we have had some issues on/off with LSWS not restarting / picking up the changes after httpd.conf was updated.
  3. capbiker

    capbiker Active Member

    I have tired a restart, but the website isn't still showing up.

    I have just checked my logs and noticed some errors appearing on it. So I am wondering if they are anything to do with it:-

    WARN [config:server:listener] No listener is available for normal virtual host!
    ERROR [config:server:epsr:lsphp5] invalid path - /usr/local/lsws/fcgi-bin/lsphp5, it cannot be started by Web server!
    ERROR [config:scripthandler] Can not find handler with type: 8, name: lsphp5.
    ERROR [config:scripthandler] Can not find External Application: lsphp5, type: lsapi
    ERROR [config:scripthandler] use static file handler for suffix [php5]
    ERROR [config] /c99\": missing closing '"'.

    I don't see how that could be it, because the default page for the main website loads up ok, and also the phpinfo.php. But nonthing shows up for the second domain.

  4. ffeingol

    ffeingol Well-Known Member

    I don't know what the 1st message means.

    All the PHP5 ones just mean that PHP 5 is defined to LSWS but there is no PHPV5 binary to run (you have to build it).

    I blieve the last one:

    Is a mod_security rule that is not being parsed. (c99) is a back door shell from memory.
  5. capbiker

    capbiker Active Member

    So what could the problem be then if it's saying that PHP V5 binary has not been built, because I know I have actually build it several times over the last week getting the server configured to how I want it using the instructions as they are set out. And PHPinfo and php -v does show PHP 5 as being built.

  6. ffeingol

    ffeingol Well-Known Member

    Are you 100% sure that LSWS is serving the pages and not Apache? You could run something like:

    lsof -i tcp:80

    That should tell you the process id that is listening on port 80 and then you can check if that process is Apache or LSWS.

  7. capbiker

    capbiker Active Member

    This is what it's showing when I run that command:-

    lshttpd 3341 root 9u IPv4 825773007 TCP localhost:http (LISTEN)
    lshttpd 3341 root 11u IPv4 825773005 TCP ( LISTEN)
    lshttpd 3341 root 13u IPv4 825773006 TCP (LISTEN)
    lshttpd 3344 nobody 9u IPv4 825773007 TCP localhost:http (LISTEN)
    lshttpd 3344 nobody 11u IPv4 825773005 TCP ( LISTEN)
    lshttpd 3344 nobody 13u IPv4 825773006 TCP (LISTEN)

    And I Am right to say that lshttpd means it's running on LSWS doesn't it? I also checked withing the LSWS admin and it's showing that 3344 is the same PID on it. I am not too sure what 3341 PID is about.

    Last edited: May 26, 2008
  8. ffeingol

    ffeingol Well-Known Member

    Yep, that sure looks like LSWS is running on port 80. Is it running on the same IP address as your other sites?
  9. capbiker

    capbiker Active Member

    I never noticed that. Looking at the info I posted it ends on .172 yet my ip address ends with .171. So could that be one of my problems? And how could I change it to make sure that it runs on .171?

  10. ffeingol

    ffeingol Well-Known Member

    Well it depends :) If it's reading the httpd.conf the you need to change it in cPanel. If you did it with LSWS I don't know how (we use cPanel). If the .172 is your IP address then it might be a firewall issue etc. blocking it.
  11. capbiker

    capbiker Active Member

    Where abouts in the cpanel would I look to change the IP?

    I don't think it's the firewall, I have got one installed on it. But it's not currently live, because it's in test mode until I have got my friends website sorted out and uploaded.
  12. ffeingol

    ffeingol Well-Known Member

    If it's being set via cPanel look under "Account Functions" in WHM. There is an option "Change Site's IP Address". But unless you set the site up as an IP based site WHM would normally assign the site to the servers shared IP address.
  13. capbiker

    capbiker Active Member

    Checked that, and it is using the right IP address with .171.
  14. mistwang

    mistwang LiteSpeed Staff

    Maybe you are using the standard edition and the 5 vhost limit has been hit?
  15. capbiker

    capbiker Active Member

    I had brought the VPS edition and running that, and I have checked and I am only running 4 vhosts (I am going to get rid of 1 later on, so it will be down to 3).

  16. capbiker

    capbiker Active Member

    Just got a question, I am wondering if any of these things could be coursing my problems

    Looking on phpinfo the option Virtual Directory Support is disabled, do I need that enabled to work?

    Also on LSWS I can see there has been references to templates called PHPSusex and rubyonrails being installed on server. When I am looking at mine, I don't have any templates within Virtual host installed anywhere.

  17. brrr

    brrr Well-Known Member

    capbiker, I think it would be a good idea to work step-by-step some of the Litespeed configuration guides at:

    Especially the ones that cover virtual hosts and also PHP virtual hosts. Just go step by step and you won't go wrong.

    It's a bit easier to follow than the Litespeed documentation at:

    To get two or more IP's working off one server is no problem. Just be sure to tell Apache (via the Listen directive in http.conf - ie 'Listen 123.456.789.012:80) to listen for HTTP traffic on port 80 on one IP, and then tell Litespeed to listen for HTTP traffic on port 80 on the other IP address. (Litespeed Admin > Configuration > Listeners), and then tell LSWS the IP address you want LSWS to use for for example the default web site.
  18. capbiker

    capbiker Active Member

    I have already looked at them, and used some of them for other stuff with litespeed. But with the virtual hosts stuff, it's no good. Because it's states that 3 pre-defined templates were installed and how to configure them. My problem is that the 3 pre-defined templates of which it uses to edit wasn't installed at the time of installing LSWS.

    Ok in httpd.conf I have added Listen and uploaded that to the server.

    Within the LSWS I have configured and set IP Address:, Port 80, binding (both with and without process 1) and restarted the server a couple of times.

    Yet when I run commend lsof -i tcp:80 it stills comes up with:-

    lshttpd 23802 root 9u IPv4 825773007 TCP localhost:http (LISTEN)
    lshttpd 23802 root 10u IPv4 825773005 TCP (LISTEN)
    lshttpd 23802 root 13u IPv4 825773006 TCP (LISTEN)
    lshttpd 23806 nobody 9u IPv4 825773007 TCP localhost:http (LISTEN)
    lshttpd 23806 nobody 10u IPv4 825773005 TCP (LISTEN)
    lshttpd 23806 nobody 13u IPv4 825773006 TCP (LISTEN)

    When it should be

    And the website where I am having virtual host problems isn't even showing still.

  19. mistwang

    mistwang LiteSpeed Staff

    Login to the web admin console then try add listener there, if that IP has not been listed, LSWS might have some problem with your IP configuration.

    Another choice is to create a wildcard listener *:80 from the web console. You need to restart twice to make it properly.
  20. capbiker

    capbiker Active Member

    I have removed the 171:80 and readded it agian to the listener and still the same problem.

    When I try *:80 (Any from the IP drop down) and port 80 within the web admin console after the restart it got an error next to it.


Share This Page