Apache working with Litespeed?

surfman

Active Member
#1
Apache working with Litespeed?

Due to Litespeed does not support SSI. can I do this way under Cpanel/WHM:

1) keep Apache running for SHTML file only
2) Litespeed running for all other pages and PHP programs?
3)both Apache and Litespeed will be installed on one server.

is that OK? please let me know how to do it if it's ok.

thanks.
 

surfman

Active Member
#4
I checked the demo, saw there are some options for type web server under external app option:

I have no ideal to enter address, environment, and how to let LSWS know it need forward the request to .shtml to apache.

could you give me an example? I am totally new to LSWS. thanks.
 
Last edited:

mistwang

LiteSpeed Staff
#5
For example,
1. run apache or port 81 or whatever port you'd like, just not 80
2. define a web server external app, address should be "127.0.0.1:81". no need to set "environment".
3. add a script handler for suffix "shtml", using the web server external app as handler. If can be done at server level or vhost level.

If any question, please read the online help first for each individual configuration option.
 

surfman

Active Member
#6
got it.

But I got another problem. I changed port value in apache httpd.conf

port 80 ==> port 8080

after that, when I visit my site, got

"There is no website configured at this address" shown.

do I have to change

NameVirtualHost IP.IP.IP.IP:80

to

NameVirtualHost IP.IP.IP.IP:8080 as well?

thanks.
 

mistwang

LiteSpeed Staff
#7
Yes, I think so.
Is LSWS using Apache's httpd.conf? If yes, you need to create a backup copy of the httpd.conf for LSWS.
Or, you can use "Apache port Offset" configuration to let LSWS run on the standard port 80 while apache on port 79 or something.
 

surfman

Active Member
#8
Finally, LSWS is working well at 80 port. Thanks for all help.

However, regarding sending .shtml to apache at port 8080 is still not working although I already set it up based on above instruction and the post at

http://litespeedtech.com/support/forum/showthread.php?t=605

I am using Apache's httpd.conf in LSWS (following the instruction at http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:apache:cpanel ). the apache offset is 0 at this moment. I am wondering if I change anything in apache's httpd.conf, will LSWS change at same time?

The reason I am asking is that all ports are 80 in old httpd.conf, that is what I am guessing why LSWS is working at port 80 too. so, if I change them to 8080, will LSWS stop working at port 80? because they are using the same httpd.conf.

thanks for further kind help.
 
Last edited:

mistwang

LiteSpeed Staff
#9
Yes, LSWS will change to port 8080 after restart since it uses the apache configuration.

Like what I said in last post, configure apache to use port 79 and 442 for SSL, set "Apache port offset" to "1", so LSWS will use port 80 and 443.
The external app address should change to "localhost:79" as well.
restart apache and LSWS, it should work.
 

surfman

Active Member
#10
After changing apache port to 79, I have the following error:

This address is restricted

This address uses a network port which is normally used for purposes other than Web browsing. Firefox has canceled the request for your protection.

under IE, the error is:

The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

.......

is there way to fix it? thanks.
 
Last edited:

mistwang

LiteSpeed Staff
#11
Firefox blocked access to port 79.
Not sure about the IE error. Is port 79 blocked by firewall? open a dos prompt and try "telnet <ip> 79" see if you can connect to the server.
If you can, it probably is something wrong with the httpd.conf.

3.0RC1 package has been updated to address a configuration issue related to shtml forwarding. Please update.
 

surfman

Active Member
#12
after changing port to 78, seems ok.

however, when I clicked any links to a shtml page, it seems still with litespeed, not sent to Apache.

I already setup the correct settings for external app, i.g. localhost:78, and script handler for suffix "shtml". also restarted lsws, it's ok when I enter by hand at browser, like, http://www.mydomain.com:78

but when I visit http://www.mydomain.com, it always stays with litespeed.

I am using 2.26 std. do I have to updated to 3.0RC1?
 
Last edited:

surfman

Active Member
#14
updated to 3.0RC1, the problem is still there.

when I visit

http://mydomain.com:78

it's fine. that means apache works fine at port 78

when I visit

http://www.mydomain.com

it shows "There is no website configured at this address" from cpanel.

but when I visit

http://www.mydomain.com/anyfolder

even

http://www.mydomain.com/anyfile.html

all are working fine, just shtml can not be visited. My default index file is a shtml page, so, the said error page is shown instead of showing a normal .shtml page.

I checked external apps settings and script handler, all settings are correct. it seems litespeed sends shtml file to somewhere where can not be processed correctly.

My apache is 1.3.34.

My external apps:

Type Name Address
Web Server Apache13 localhost:78

and script handler:

Suffixes Handler Type Handler Name
shtml Web Server [Server Level]: Apache13

the above info is for your reference.

any suggestion? thanks.
 
Last edited:

surfman

Active Member
#15
a little further info for the problem.

after I removed external apps and script handler,

http://www.mydomain.com

is working under litespeed. for sure, there are SSI missing on my each shtml page.

alright, I added back external apps and script handler,

http://www.mydomain.com

shows the said error page from Cpanel. I traced the error, it comes from

/usr/local/apache/htdocs

Seems litespeed send shtml to apache at port 78. but apache failed to parse job for shtml. although, if I directly visit

http://www.mydomain.com:78

all shtml pages are working fine. any idea to fix it? thanks.
 

surfman

Active Member
#16
well, well, well, finally, it works. I even have no idea how I fixed it. the settings are as same as that stated in my previous post. but it works!

Anyway, thanks to the owesome software. let my server drop server load from more than 50 to about 7 or 8 at this moment.

I will continue to install APC or eaccelerator later to get max performance.
 

mistwang

LiteSpeed Staff
#18
I think the problem probably is the namevirtualhost, if you only host one web site on one IP, you don't have to use namedvirtualhost. And in the <VirtualHost ...> directive, see if you can get rid of the port number only leave the IP address.

The problem probably is because LSWS send Apache Host header with "www.mydomain.com", but Apache only like "www.mydomain.com:78".
 

surfman

Active Member
#19
my VirtualHost settings:

All my.ip.addre.ss is one same IP

PHP:
NameVirtualHost my.ip.addre.ss:78
<VirtualHost my.ip.addre.ss>
ServerAlias mydomain.net
ServerAdmin webmaster@mydomain.net
DocumentRoot /home/myusername/public_html
BytesLog domlogs/mydomain.net-bytes_log
ServerName www.mydomain.net

User myusername
Group myusername
CustomLog /usr/local/apache/domlogs/mydomain.net combined
ScriptAlias /cgi-bin/ /home/myusername/public_html/cgi-bin/
</VirtualHost>


<VirtualHost my.ip.addre.ss>
ServerAlias www.blogs.mydomain.net
ServerAdmin webmaster@blogs.mydomain.net
DocumentRoot /home/myusername/public_html/blogs
BytesLog domlogs/blogs.mydomain.net-bytes_log
ServerName blogs.mydomain.net

User myusername
Group myusername
CustomLog /usr/local/apache/domlogs/blogs.mydomain.net combined
ScriptAlias /cgi-bin/ /home/myusername/public_html/blogs/cgi-bin/
</VirtualHost>


<VirtualHost my.ip.addre.ss>
ServerAlias www.classifieds.mydomain.net
ServerAdmin webmaster@classifieds.mydomain.net
DocumentRoot /home/myusername/public_html/classifieds
BytesLog domlogs/classifieds.mydomain.net-bytes_log
ServerName classifieds.mydomain.net

User myusername
Group myusername
CustomLog /usr/local/apache/domlogs/classifieds.mydomain.net combined
ScriptAlias /cgi-bin/ /home/myusername/public_html/classifieds/cgi-bin/
</VirtualHost>
 
Top