Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:directadmin:custombuild-installation [2016/05/02 18:52]
Jackson Zhang [Troubleshooting]
litespeed_wiki:directadmin:custombuild-installation [2018/04/02 19:19]
Eric Leu [Troubleshooting]
Line 1: Line 1:
 ====== Installing LiteSpeed Web Server with CustomBuild 2.0 ====== ====== Installing LiteSpeed Web Server with CustomBuild 2.0 ======
  
-Starting with CustomBuild 2.0 RC7, [[http://​forum.directadmin.com/​showthread.php?​t=44743|DirectAdmin'​s CustomBuild 2.0]] supports integration with LiteSpeed Web Server. This wiki will guide you through the steps to installing LSWS on a server using DirectAdmin with CustomBuild 2.0.+Starting with CustomBuild 2.0 RC7, [[http://​forum.directadmin.com/​showthread.php?​t=44743|DirectAdmin'​s CustomBuild 2.0]] supports integration with LiteSpeed Web Server. This wiki will guide you through the steps for installing LSWS on a server using DirectAdmin with CustomBuild 2.0.
  
 This wiki assumes that you already have a working server using DirectAdmin (version 1.45.2 and up), CustomBuild 2.0, and Apache. This wiki assumes that you already have a working server using DirectAdmin (version 1.45.2 and up), CustomBuild 2.0, and Apache.
Line 22: Line 22:
 **Notes:** **Notes:**
   * CustomBuild 2.0 will always install the latest version of LSWS.   * CustomBuild 2.0 will always install the latest version of LSWS.
-  * If you have an existing installation of LSWS, you will still need to run the above commands to see LSWS in CustomBuild and DirectAdmin'​s Service Manager. +  * If you have an existing installation of LSWS, you will still need to run the above commands ​in order to see LSWS in CustomBuild and DirectAdmin'​s Service Manager. 
-  * If you do not have an existing installation of LSWS, CustomBuild will assign you a username and password for the LSWS WebAdmin console. The username is "admin", the password will be randomly generated. The password appears at the end of the install:+  * If you do not have an existing installation of LSWS, CustomBuild will assign you a username and password for the LSWS WebAdmin console. The username is ''​admin''​, the password will be randomly generated. The password appears at the end of the installation:
  
 {{litespeed_wiki:​directadmin:​custombuild_admin_password.png?​700}} {{litespeed_wiki:​directadmin:​custombuild_admin_password.png?​700}}
Line 33: Line 33:
 ==== 1. Edit Options ==== ==== 1. Edit Options ====
  
-In the Edit Options tab, change the php1_mode setting to "lsphp".+In the ''​Edit Options'' ​tab, change the ''​php1_mode'' ​setting to ''​lsphp''​.
  
 {{litespeed_wiki:​directadmin:​custombuild_edit_php.png?​700}} {{litespeed_wiki:​directadmin:​custombuild_edit_php.png?​700}}
  
-Then change the webserver setting to "litespeed".+Then change the ''​webserver'' ​setting to ''​litespeed''​.
  
 {{litespeed_wiki:​directadmin:​custombuild_edit_webserver.png?​700}} {{litespeed_wiki:​directadmin:​custombuild_edit_webserver.png?​700}}
    
-Save the settings ​from the bottom of the page.+Save your settings ​by clicking the ''​Save''​ button at the bottom of the page. 
 ==== 2. Build Software ==== ==== 2. Build Software ====
  
-Then go to the Build Software tab. First, build LSWS.+Go to the ''​Build Software'' ​tab. First, build LSWS.
  
 {{litespeed_wiki:​directadmin:​custombuild_build_litespeed.png?​700}} {{litespeed_wiki:​directadmin:​custombuild_build_litespeed.png?​700}}
  
-**Note:** If you do not have an existing installation of LSWS, CustomBuild will assign you a username and password for the LSWS WebAdmin console. The username is "admin", the password will be randomly generated. The password appears at the end of the install:+**Note:** If you do not have an existing installation of LSWS, CustomBuild will assign you a username and password for the LSWS WebAdmin console. The username is ''​admin''​, the password will be randomly generated. The password appears at the end of the installation:
  
 {{litespeed_wiki:​directadmin:​custombuild_admin_password.png?​700}} {{litespeed_wiki:​directadmin:​custombuild_admin_password.png?​700}}
Line 64: Line 65:
 **Notes:** **Notes:**
   * CustomBuild 2.0 will always install the latest version of LSWS.   * CustomBuild 2.0 will always install the latest version of LSWS.
-  * If you have an existing installation of LSWS, you will still need to follow the steps above to see LSWS in CustomBuild and DirectAdmin'​s Service Manager.+  * If you have an existing installation of LSWS, you will still need to follow the steps above in order to see LSWS in CustomBuild and DirectAdmin'​s Service Manager.
  
 ===== Using the LiteSpeed DirectAdmin Plugin with CustomBuild Integration ===== ===== Using the LiteSpeed DirectAdmin Plugin with CustomBuild Integration =====
Line 70: Line 71:
 Now that CustomBuild 2.0 has LSWS integration,​ [[litespeed_wiki:​directadmin:​custombuild-with-litespeed-plugin|some of the LiteSpeed DirectAdmin Plugin'​s functions are now redundant]]. We will be updating the Plugin to include only functionality not covered by CustomBuild 2.0. Now that CustomBuild 2.0 has LSWS integration,​ [[litespeed_wiki:​directadmin:​custombuild-with-litespeed-plugin|some of the LiteSpeed DirectAdmin Plugin'​s functions are now redundant]]. We will be updating the Plugin to include only functionality not covered by CustomBuild 2.0.
  
-====== ​Switch ​between Apache and LiteSpeed ====== +====== ​Switching ​between Apache and LiteSpeed ====== 
-Custombuild ​does not provide hot switch between web servers. Each time during the switch, you will change the web server and recompile ​the PHP again. You can run a series of commands through ​custom build 2.0 to make it happen. Alternatively, ​you can run the following script to switch web server ​and recompile PHP.+ 
 +CustomBuild ​does not provide ​hot switch between web servers. Each time you switch ​servers, you will need to recompile PHP again. You can run a series of commands through ​CustomBuild ​2.0 to make this happen ​or you can run the following script to switch web servers ​and recompile PHP.
  
   /​usr/​local/​lsws/​admin/​misc/​cp_switch_ws.sh lsws(or apache)   /​usr/​local/​lsws/​admin/​misc/​cp_switch_ws.sh lsws(or apache)
  
-Direct Admin will make a hot switch feature in the nearly ​future.+DirectAdmin ​will be adding ​a hot switch feature in the near future.
  
 +====== Setup Multi PHP version ======
 +For Custombuild2 PHP1_release=5.6,​ PHP2_release=7.1 as example. \\
 +Login as user level -> click domain settings and you will see: \\
 +{{:​litespeed_wiki:​directadmin:​da-4.png?​600|}} \\
 +Note: 
 +  - Before setup multi PHP version, please make sure PHP handler setup already.
 +  - May need to restart web server to make settings effect
 +
 +
 +====== Setup CloudLinux Selector PHP version ======
 +  - From CageFS User Manager add user as Enabled user
 +  - LVE Manager set Default php version to **Native**
 +  - Login as user level -> Choose **Select PHP version** to the version you want. 
 +====Verify method==== ​
 +''​su - USER_ACCOUNT -s /​bin/​bash''​ \\
 +''​php -v''​ \\
 +Then you should see the version you choose from **Select PHP version** ​
  
 ====== Troubleshooting ====== ====== Troubleshooting ======
Line 82: Line 101:
 **Installation of LiteSpeed 5.0.16 is now complete.** **Installation of LiteSpeed 5.0.16 is now complete.**
  
-Your server IP may trial license before and it has been expired. You should purchase a license or login ticket to ask trial extension. Please ​serial ​no to /​usr/​local/​lsws/​conf/​ or download a new trial key.+Your server IP has used a trial license before and it has expired. You should purchase a license or log a ticket ​with us to ask for a trial extension. Please ​copy your serial ​number file to ''​/​usr/​local/​lsws/​conf/​'' ​or download a new trial key.
  
 2. **MIME type [application/​x-httpd-php55] for suffix '​.php'​ does not allow serving as static file, access denied!** 2. **MIME type [application/​x-httpd-php55] for suffix '​.php'​ does not allow serving as static file, access denied!**
  
-  .php55 suffix should be created to be associated with php external apps, for example, lsphp5. +  ​A ''​.php55'' ​suffix should be created to be associated with php external apps, for example, lsphp5. 
-  ​It can be done through ​web admin console or vi /​usr/​local/​lsws/​conf/​httpd_config.xml by adding  +  ​This can be done through ​the WebAdmin ​console or ''​vi /​usr/​local/​lsws/​conf/​httpd_config.xml'' ​by adding  
-  the following to inside of <​scriptHandlerList> ​  </​scriptHandlerList>​+  the following to inside of the ''​<​scriptHandlerList> ​  </​scriptHandlerList>​''​ block:
        
     <​scriptHandler>​     <​scriptHandler>​
Line 96: Line 115:
       <​note></​note>​       <​note></​note>​
     </​scriptHandler>​     </​scriptHandler>​
- +3. **PHP1/2 select not working** ​   ​ 
-  ​+  ​- Check php1 by ''​grep php1 /​usr/​local/​directadmin/​custombuild/​options.conf''​ 
 +  - Check config file, e.g. ''/​usr/​local/​directadmin/​data/​users/​USER_ACCOUNT/​httpd.conf''​ 
 +  - Check PHP selector setup correctly through LiteSpeed web admin 
 +  - If you change some php settings, sometimes may need to rebuild to make it works
  • Admin
  • Last modified: 2020/04/28 13:02
  • by Jackson Zhang