Installing with Cpanel

mistwang

LiteSpeed Staff
#21
If you find LSWS has difficulty parsing your httpd.conf, and you don't mind, please send us the section causing problem, we will fix it soon. :)
 
#22
After many days of proxying from apache to lsws, there are still something of interest though.

In "Use apache config" mode, does lsws capable of running php in suExec mode, or do we need to tinker with deploying lsphp for each vhost through External App setting in VH template section?

When running lsws on port 80, how to make bandwidth calculation and overusage suspension work in cPanel?
 

mistwang

LiteSpeed Staff
#23
In "Use apache config" mode, does lsws capable of running php in suExec mode, or do we need to tinker with deploying lsphp for each vhost through External App setting in VH template section?
Currently, you need to use the VH template if you want PHP suEXEC. We will add a feature to address this later.

When running lsws on port 80, how to make bandwidth calculation and overusage suspension work in cPanel?
When run LSWS off apache configuration, LSWS logs bandwidth usage into the same bandwidth log file produced by mod_log_byte in Apache. So Cpanel can calculate the bandwidth usage as usual. No sure how cPanel suspend an account with Apache though.
 
#24
mistwang said:
Currently, you need to use the VH template if you want PHP suEXEC. We will add a feature to address this later.
Cool. Is there any ETA on this?

When run LSWS off apache configuration, LSWS logs bandwidth usage into the same bandwidth log file produced by mod_log_byte in Apache. So Cpanel can calculate the bandwidth usage as usual. No sure how cPanel suspend an account with Apache though.
Real cool.

The way that cPanel suspends account is simply to put a rewrite rule into user's public_html/.htacces file:

Code:
# cat .htaccess
RedirectMatch .* http://main.server.host/suspended.page/
Options -Includes -Indexes -ExecCGI
Well, seem like LSWS is getting there to be compatible with a leading control panel. It's going to be a very nice milestone marketing wise. :)

To make the migration more seamless, by initially proxying requests from cPanel's apache install to lsws, I wonder if there's any way to also forward client's ip addresses to lsws as well? This will make many web apps that rely on client's ip addresses to work as usual and server operator having a piece of mind of watching lsws working in their real production env. :)

Thanks.
 

mistwang

LiteSpeed Staff
#25
Is there any ETA on this?
it is demand driven and working in progress, no definite ETA yet. :)

I wonder if there's any way to also forward client's ip addresses to lsws as well?
The client IP should be forwarded via HTTP header "X-Forwarded-For" by Apache, you may have to modify web app code to extract that.
Proxying through Apache will not give you the performance advantage provided by LSWS. :)
 

pizzaman

Active Member
#26
mistwang said:
Proxying through Apache will not give you the performance advantage provided by LSWS. :)
Actually, the thing I'm getting by doing this is a big reduction in memory and a moderate reduction in CPU usage by replacing apache+php with lsws+php. :)

There are also a couple other servers that apache were replaced by LSWS completely. One of them used to run apache2 then replaced by lighttpd and then again by lsws.
 
#27
Just to report back on progess, with help from mistwang I have LSWS up and running on a server with CPanel. Seems fully compatible so far, I'll keep running various tests to see how it goes. Setup is painless, and autoloading the Apache configuration has caused no problems. Awesome stuff :D
 

xing

LiteSpeed Staff
#28
To Suxen and all the CPanel folks out there.

LiteSpeed 2.1.15 Release now has an option to enable CPanel compatible bandwidth logging. Enjoy! =)
 
#29
Where exactly would this code be posted?

Yes it works if I use this in .htaccess

Code:
php_value register_globals 1
(i know, it shouldn't be that way but some people just don't bother to improve their old codes because they _work_ :( )

But since we've got quite a few people putting this in user's php.ini file in their www directory:

Code:
register_globals = On
Is there anyway to make user's php.ini being recognized by lsws/php?

Thanks.
Hi! This is exactly what I was looking for.. (shocking)! However, I am not sure where the register code would be posted to enable the OS commerce I recently installed??
 

mistwang

LiteSpeed Staff
#30
Like what pizzaman did, create a .htaccess file under the directory where osCommerce is installed. Add it there.
And you need to make sure the htacess support has been turned on.
 
#31
Like what pizzaman did, create a .htaccess file under the directory where osCommerce is installed. Add it there.
And you need to make sure the htacess support has been turned on.
I can't seem to get into the directory where osCommerce is installed. I created it as a separate directory (ex. ralphcherman.com/shop) and the admin panel is not allowing me to access. Is there a way to get into this to create the .htaccess file from my cPanel FTP or something? Thanks for all your help, I really appreciate it.
 

mistwang

LiteSpeed Staff
#32
See if there is a "shop" directory accessible through FTP, and upload .htaccess file there.
You can also try to change the .htaccess file under public_html/, it will affect all php scripts in your site though.
 
Top