Virtual Hosts & Additonal Websites

capbiker

Active Member
#1
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?

cap
 

capbiker

Active Member
#3
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.

cap
 

ffeingol

Well-Known Member
#4
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:

ERROR [config] /c99\": missing closing '"'.
Is a mod_security rule that is not being parsed. (c99) is a back door shell from memory.
 

capbiker

Active Member
#5
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.
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.

cap
 

ffeingol

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

Frank
 

capbiker

Active Member
#7
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 home.stalkerrealm.com:http ( LISTEN)
lshttpd 3341 root 13u IPv4 825773006 TCP xx.xxx.xxx.172:http (LISTEN)
lshttpd 3344 nobody 9u IPv4 825773007 TCP localhost:http (LISTEN)
lshttpd 3344 nobody 11u IPv4 825773005 TCP home.stalkerrealm.com:http ( LISTEN)
lshttpd 3344 nobody 13u IPv4 825773006 TCP xx.xxx.xxx.172:http (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.

cap
 
Last edited:

capbiker

Active Member
#9
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?

cap
 

ffeingol

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

ffeingol

Well-Known Member
#12
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
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.
Checked that, and it is using the right IP address with .171.
 
#16
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.

cap
 

brrr

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

http://www.usefuljaja.com/litespeed

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:
http://www.litespeedtech.com/docs

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, I think it would be a good idea to work step-by-step some of the Litespeed configuration guides at:

http://www.usefuljaja.com/litespeed

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:
http://www.litespeedtech.com/docs
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.

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.
Ok in httpd.conf I have added Listen xx.xxx.xxx.171:80 and uploaded that to the server.

Within the LSWS I have configured and set IP Address: xx.xxx.xxx.171, 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:-

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
lshttpd 23802 root 9u IPv4 825773007 TCP localhost:http (LISTEN)
lshttpd 23802 root 10u IPv4 825773005 TCP home.stalkerrealm.com:http (LISTEN)
lshttpd 23802 root 13u IPv4 825773006 TCP xx.xxx.xxx.172:http (LISTEN)
lshttpd 23806 nobody 9u IPv4 825773007 TCP localhost:http (LISTEN)
lshttpd 23806 nobody 10u IPv4 825773005 TCP home.stalkerrealm.com:http (LISTEN)
lshttpd 23806 nobody 13u IPv4 825773006 TCP xx.xxx.xxx.172:http (LISTEN)

When it should be xx.xxx.xxx.171.

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

cap
 

mistwang

LiteSpeed Staff
#19
Login to the web admin console then try add listener xx.xxx.xxx.171:80 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
Login to the web admin console then try add listener xx.xxx.xxx.171:80 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.
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.

cap
 
Top