Installing with Cpanel

Discussion in 'Install/Configuration' started by Suxen, Mar 4, 2006.

  1. mistwang

    mistwang LiteSpeed Staff

    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. :)
  2. pizzaman

    pizzaman Active Member

    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?
  3. mistwang

    mistwang LiteSpeed Staff

    Currently, you need to use the VH template if you want PHP suEXEC. We will add a feature to address this later.

    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.
  4. pizzaman

    pizzaman Active Member

    Cool. Is there any ETA on this?

    Real cool.

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

    # cat .htaccess
    RedirectMatch .*
    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. :)

  5. mistwang

    mistwang LiteSpeed Staff

    it is demand driven and working in progress, no definite ETA yet. :)

    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. :)
  6. pizzaman

    pizzaman Active Member

    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.
  7. Suxen

    Suxen Member

    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
  8. xing

    xing LiteSpeed Staff

    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! =)
  9. jemmaj

    jemmaj New Member

    Where exactly would this code be posted?

    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??
  10. mistwang

    mistwang LiteSpeed Staff

    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.
  11. jemmaj

    jemmaj New Member

    I can't seem to get into the directory where osCommerce is installed. I created it as a separate directory (ex. 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.
  12. mistwang

    mistwang LiteSpeed Staff

    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.

Share This Page