How to configure LiteSpeed Web Server (LSWS) with HC
LiteSpeed Web Server is a lightweight web server capable of reading Apache configurations directly. It is now supported with HC.
Instructions for Configuring LiteSpeed
By default LiteSpeed is not configured with Apache Web Server. Therefore some additional steps are needed for its configuration.
- After successful installation of LiteSpeed Web Server you can access its user interface through this URL: http://serverip:7080/
- Now go to server configuration page from navigation menu. (Configurations => Server)
- Scroll down the page to bottom and click “Using Apache Configuration File”.
- Now Click “Edit Link” and set the properties accordingly as described below:
Load Apache Configuration Yes
Auto Reload On Changes No
Apache Binary Path /usr/sbin/httpd
Apache Configuration File /etc/httpd/conf/httpd.conf
Apache Port Offset 3000
Note: LiteSpeed will add this value to the default Apache port (i.e. 80) and use the added value such as 3080. If you want to use default port 80 then you can set it to 0 or leave it blank. For further details see this link
Apache IP Offset Not Set
Apache Handled Content Not Set
Ignore Apache Modules Not Set
Just In Time Configuration Not Set
PHP suEXEC Yes
PHP suEXEC Max Conn Not Set
Enable FrontPage Extension Not Set
Apache Environment Not Set
And then click “Save link”.
- On the same page, now scroll up and click on “Index Files” and then click “Edit link”.
- Set Auto Index to ‘Yes’ and then click “Save Link”.
Follow the steps below for replacing the patch file on your Linux machine:
- Download the file (libhcapache.zip).
- Extract the file (libhcapache.so).
- Stop HC 9 services on Linux machine through this command: hc9 stop
- Replace the downloaded file (libhcapache.so) with the existing one which is located at this path: (/usr/local/hostingcontroller/bin).
- Now start the HC 9 services through this command: hc9 start
Configurations in HC
Further additional steps are required to configure LiteSpeed in HC Panel:
- Login to HC panel as Host (hcadmin).
- Go to the path Manage Servers :: My Servers :: Edit Server :: Web Server.
- On this Linux WebServer role configuration page change the default PID File Path with liteSpeed PID file path by clicking the browse button i.e. (/tmp/lshttpd/lshttpd.pid)
- And then Update the Web Server Role.
LiteSpeed server is now properly configured with HC. You may now create websites from your HC panel and access them like domain:offset (where offset is the port offset which you have configured above in LiteSpeed) i.e http://www.domain.com:offset or if your offset was set to 0 then http://www.domain.com.