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
litespeed_wiki:cpanel:easyapache4-config [2018/06/07 14:58]
qtwrk [Configuring cPanel + EasyApache 4 with LiteSpeed]
litespeed_wiki:cpanel:easyapache4-config [2019/10/01 14:28] (current)
Lisa Clarke Redirected to new URL
Line 1: Line 1:
-====== Configuring cPanel + EasyApache 4 with LiteSpeed ====== +~~REDIRECT>​litespeed_wiki:​cpanel:​ea3toea4~~
- +
-EasyApache is software that installs, configures, updates, and validates your web server, PHP, and other web server components.  +
- +
-EasyApache 4 (EA4) represents a total overhaul in how cPanel & WHM ships and maintains their Apache and PHP distributions. The following steps will show you how to configure LiteSpeed Web Server to work with cPanel + EasyApache 4. +
- +
-**Note:** It is assumed that you have already made the switch from EasyApache 3 to EasyApache 4. Please note that you have to **switch back to Apache web server** before migration otherwise it may cause [[litespeed_wiki:​cpanel:​ea3toea4_migration_error|problems]]. Then you can either use LiteSpeed plugin for cpanel for one click LiteSpeed EA3 to EA4 upgrade or manually upgrade LiteSpeed to be EA4 compatible.  +
- +
-====== LiteSpeed EA3 to EA4 One Click Upgrade ====== +
-Staring from version 2.1.8, LiteSpeed'​s WHM Plugin will detect and notify you if you need to upgrade LiteSpeed from EA3 to EA4 or vice versa.  +
- +
-{{ :​litespeed_wiki:​cpanel:​whm-ea3-to-ea4-warning.png?​nolink |}} +
- +
-The upgrade itself will be performed automatically after clicking "​Resolve Now" and confirming. This is much easier than manually updating your configuration. To use this feature, please either upgrade LSWS to the latest version ​>= 5.1.7 or upgrade the LiteSpeed WHM Plugin separately to at least version 2.1.8. Upgrade LSWS will automatically upgrade the LiteSpeed WHM Plugin. +
-  /​usr/​local/​lsws/​admin/​misc/​lsup.sh -f -v <​latest-version>​ +
- +
-Alternatively,​ you can run the upgrade script: +
-  /​usr/​local/​cpanel/​whostmgr/​docroot/​cgi/​lsws/​migrate_ea3_to_ea4_litespeed.sh +
- +
-The upgrade script is the easiest way. However if you still want to do it manually or try to understand how the upgrade works, please follow the following steps. +
- +
-====== LiteSpeed EA3 to EA4 manual upgrade ====== +
-===== Preamble ===== +
- +
-Upgrade script mentioned above is always the best way. The following manually upgrade steps are for your knowledge only or you still want to keep your hand dirty for any reason. +
- +
-EA4 uses the Software Collections Library (SCL) for PHP.  The use of SCLs enable the installation of multiple concurrent version of PHP on the file system. SCL is installed at /​opt/​cpanel/​ea-php*. You need to install corresponding LSAPI binary packages from cPanel EA4 repository for each php version to enable LiteSpeed work with ea4 phps.  +
- +
-For example, assuming ea-php54, ea-php55, ea-php56, ea-php70 have been installed, you will need to install ea-phpxx-php-litespeed ( xx means 54,55,56 and 70 ) packages. +
- +
- +
-===== Configuration Steps ===== +
- +
-  - Install lsphp for EA4 \\ \\ <​code>​yum install ea-php54-php-litespeed ea-php55-php-litespeed ea-php56-php-litespeed ea-php70-php-litespeed</​code>​ **Note:** The lsphp binary will be installed to "/​opt/​cpanel/​ea-phpxx/​root/​usr/​bin/​lsphp"​ (xx means 54,55,56 and 70) +
-  - Copy default lsphp to the standard directory, assuming you are going to use php56 as default \\ \\ <​code>​cp /​opt/​cpanel/​ea-php56/​root/​usr/​bin/​lsphp /​usr/​local/​bin/​lsphp</​code>​ +
-  - From the LiteSpeed Admin Console, create/​modify the default lsphp5 command to "/​usr/​local/​bin/​lsphp"<​code>​ln -sf /​usr/​local/​bin/​lsphp /​usr/​local/​lsws/​fcgi-bin/​lsphp5</​code>​ +
-  - Other than the default lsphp5 handler, [[litespeed_wiki:​php:​rpm#​installing_multiple_php_versions|create new]] lsphp54/​lsphp55/​lsphp56/​lsphp70 handlers pointing to "/opt/cpanel/​ea-phpxx/​root/​usr/​bin/​lsphp"​ (xx is 54,55,56 or 70) accordingly. {{:​litespeed_wiki:​cpanel:​cpanel-ea4-multi-php1.png?​720|}} {{ :​litespeed_wiki:​cpanel:​cpanel-ea4-multi-php-lsphp56-example.png?​500 |}} +
-  - Like the default handler where .php -> lsphp5 and .php5 -> lsphp5, set the related new handlers for surfixes .php54, .php55, .php56 and .php70 pointing to lsphp54, lsphp55, lsphp56 and lsphp70 respectively.{{:​litespeed_wiki:​cpanel:​cpanel-ea4-multi-php-handlers.png?​720|}} +
-  - Perform a Graceful Restart of LSWS. +
- +
-When choosing a PHP version for a domain in cPanel Admin Home -> Software -> Multi-PHP Manager, LiteSpeed will now correctly use the selected version. PHP handlers should be **"​CGI"​** (can not be "​DSO"​) to able to choose different versions. Otherwise, LiteSpeed may only return the default version instead of the version you have selected from Multi-PHP manager. +
- +
-{{:​litespeed_wiki:​cpanel:​cpanel-ea4-multi-php-manager-1.png?​800|}} +
- +
-{{:​litespeed_wiki:​cpanel:​cpanel-ea4-multi-php-handlers-cgi.png?​nolink&​500|}} +
-===== Possible Errors ===== +
- +
-If you are experienceing any of the following errors: +
- +
-<​code>​“MIME type [application/​x-httpd-ea-php70] for suffix '​.php'​ does not allow serving as static file, access denied!” +
- +
-“MIME type [application/​x-httpd-ea-php56] for suffix '​.php'​ does not allow serving as static file, access denied!” +
- +
-“MIME type [application/​x-httpd-ea-php55] for suffix '​.php'​ does not allow serving as static file, access denied!” +
- +
-“MIME type [application/​x-httpd-ea-php54] for suffix '​.php'​ does not allow serving as static file, access denied!” </​code>​ +
- +
-It is likely that your PHP handler has not yet been properly configured. Please follow the steps above to configure it. You should also upgrade LiteSpeed Web Server to the latest version to ensure correct MIME type recognition. +
- +
-**Note:** LSWS is not compatible with mod_ruid2 because LSWS does not allow the process user to change mid-process. Make sure that mod_ruid2 is disabled in your WHM settings when using LSWS. LSWS is compatible with Apache prefork or event MPM. If mod_ruid2 is enabled, a variety of functionality may be disrupted due to WHM creating files that the web server user cannot access.+
  • Admin
  • Last modified: 2018/06/07 14:58
  • by qtwrk