View Full Version : Virtual Hosts & Additonal Websites
capbiker
05-26-2008, 11:32 AM
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
ffeingol
05-26-2008, 11:53 AM
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: http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:cpanel
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.
capbiker
05-26-2008, 01:01 PM
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
05-26-2008, 01:25 PM
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
05-26-2008, 01:30 PM
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
05-26-2008, 02:08 PM
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
05-26-2008, 02:17 PM
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
ffeingol
05-26-2008, 02:32 PM
Yep, that sure looks like LSWS is running on port 80. Is it running on the same IP address as your other sites?
capbiker
05-26-2008, 02:37 PM
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
05-26-2008, 02:44 PM
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.
capbiker
05-26-2008, 02:48 PM
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
05-26-2008, 03:09 PM
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.
capbiker
05-26-2008, 03:15 PM
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.
mistwang
05-26-2008, 11:00 PM
Maybe you are using the standard edition and the 5 vhost limit has been hit?
capbiker
05-27-2008, 02:46 AM
Maybe you are using the standard edition and the 5 vhost limit has been hit?
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).
cap
capbiker
05-27-2008, 07:20 AM
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
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.
capbiker
05-27-2008, 12:19 PM
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
05-27-2008, 12:30 PM
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.
capbiker
05-27-2008, 12:55 PM
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
capbiker
05-27-2008, 01:00 PM
I just recieved this email:-
At [27/May/2008:18:48:15 +0000], web server with pid=21801 received unexpected signal=6, a core file is created. A new instance of web server will be started automatically!
Please forward the following debug information to bug@litespeedtech.com.
Environment:
Server: LiteSpeed/3.3.12 Enterprise
OS: Linux
Release: 2.6.18-53.1.13.el5.028stab053.10
Version: #1 SMP Tue Apr 1 14:45:45 MSD 2008
Machine: i686
If the call stack information does not show up here, please compress and forward the core file located in /tmp/lshttpd/.
Should I forward that to the tech's here, and what is the actually core file called that it meants?
mistwang
05-27-2008, 02:32 PM
3.3.13 release package is available now, just change the version number in the download link to get the new release package.
Should be fixed.
I'm confused.
From your lsof listing and other parts of your post, you seem to have access to two IP addresses: *.171, and *.172. Is that right?
And are we talking about just running Litespeed here, with no Apache running anywhere, or running both side-by-side, but perhaps on different IP addresses?
My experience is running Apache and Litespeed side by side on one server but serving up web sites off different IP addresses over port 80. That's the sort of setup I was thinking about when I made my config suggestion. Maybe it doesn't match what you want to do.
capbiker
05-28-2008, 07:20 AM
3.3.13 release package is available now, just change the version number in the download link to get the new release package.
Should be fixed.
I have downloaded 3.3.13 and upgraded it, and I am still getting the same error for *:80. I have restarted the server a number twice to make sure that the settings take. But still getting the same error. Looking at the logs it is showing the followings errors:-
[config:server:listener:*:80] failed to start listener on address *:80!
HttpServer::addListener(*:80) failed to create new listener
HttpListener::start(): Can't listen at address *:80: Address already in use!
I'm confused.
From your lsof listing and other parts of your post, you seem to have access to two IP addresses: *.171, and *.172. Is that right?
And are we talking about just running Litespeed here, with no Apache running anywhere, or running both side-by-side, but perhaps on different IP addresses?
My experience is running Apache and Litespeed side by side on one server but serving up web sites off different IP addresses over port 80. That's the sort of setup I was thinking about when I made my config suggestion. Maybe it doesn't match what you want to do.
Ok what I want to happen is to have litespeed as the main server (At the moment I don't have any need for apache to be running). But I am having major problems with Virtual Hosts because I am going to be hosting my main website (The main part of my server is working ok with that). But I am going to also be hosting my friend's website and also another smaller website of mine on it too.
When I try to set up a sub account to host my friends website and upload everything for it. When I go to the correct address for where it is located nonthing comes up, it is just a blank screen. Looking at the actually source of the page it is showing a 403 error. So there is a problem with the virtual host somewhere or I have or else something else has been configured wrongly.
cap
ffeingol
05-28-2008, 07:25 AM
If it says port 80 is in use, use the lsof command to figure out what has port 80.
You said you are using cPanel. Did you follow the LSWS/cPanel configuration and configure LSWS to just read the httpd.conf?
Finally, did you just try shutting down LSWS and starting Apache back up? If the "new" domain does not work properly with Apache, it's prob. never going to work right with LSWS.
capbiker
06-07-2008, 11:44 AM
If it says port 80 is in use, use the lsof command to figure out what has port 80.
You said you are using cPanel. Did you follow the LSWS/cPanel configuration and configure LSWS to just read the httpd.conf?
Finally, did you just try shutting down LSWS and starting Apache back up? If the "new" domain does not work properly with Apache, it's prob. never going to work right with LSWS.
I managed just fixed it. In the end, I decided to just rebuild the server from scratch and got rid of some of the problems that I had before.
Still had a bit of a problem, was going to post in here for some more help with the LSWS not reading the httpd.conf. It wasn't until I read your reply and looked at the wiki config instructions and did what it said. That the website loaded propertly now. :)
Still need to sort out some more stuff with the server, but it should not take me as long as it did the first time because I know what I am doing now.
Thanks.