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:php:which_php_setup_am_i_using [2018/09/14 15:42]
Michael Alegre [Which process mode am I using?]
litespeed_wiki:php:which_php_setup_am_i_using [2018/09/19 19:29] (current)
Michael Alegre [PHP SuEXEC mode]
Line 1: Line 1:
 ====== PHP SuEXEC mode ====== ====== PHP SuEXEC mode ======
 +suEXEC is an Apache execution method for CGI and SSI programs that makes executing PHP scripts more secure by running each PHP process as the owner of a particular account instead of as the user running the web server. This means that even if one user on a server is compromised,​ PHP scripts run from their accounts will not have access to other users' files. suEXEC has long been a basic feature in shared hosting environments.
  
 +LiteSpeed Web Server is capable of using this execution method directly when configured to read Apache configuration files. When running LiteSpeed Web Server (native),a similar implementation,​ called **ExtApp Set UID Mode**, is available at the Virtual Host level. suEXEC like behavior can also be achieved at the External Application level using the **Run as User** and **Run as Group** settings.
 ===== PHP SuEXEC enabled on control panel by default ===== ===== PHP SuEXEC enabled on control panel by default =====
 If you run shared hosting services with a control panel, it is necessary to use SuEXEC mode for security reasons. Our LSWS installation script will enable PHP SuEXEC by default for all control panels hence LSWS will run PHP SuEXEC out of the box. In SuEXEC mode, each PHP process will run as the owner of the virtual host's document root.  If you run shared hosting services with a control panel, it is necessary to use SuEXEC mode for security reasons. Our LSWS installation script will enable PHP SuEXEC by default for all control panels hence LSWS will run PHP SuEXEC out of the box. In SuEXEC mode, each PHP process will run as the owner of the virtual host's document root. 
  
-To manually enable SuEXEC on LSWS for cPanel, Plesk, or another control panel, ​''​Admin Console -> Server ​-Server ​General ​-> Using Apache Configuration File -> PHP suEXEC'' ​should be set to ''​Yes''​. However, Enabling PHP suEXEC for the control panels is default setup during the installation and you have no need to manually change it here. Once it is set, generally you should not make change anymore to avoid permission problem, since PHP SuEXEC will generally run as "user:user" ​while non-PHP SuEXEC will run as "nobody:​nobody".+To manually enable SuEXEC on LSWS for cPanel, Plesk, or another control panel, ​**Configuration ​> Server > General > Using Apache Configuration File > PHP suEXEC** should be set to ''​Yes''​. However, Enabling PHP suEXEC for the control panels is default setup during the installation and you have no need to manually change it here. Once it is set, generally you should not make change anymore to avoid permission problem, since PHP SuEXEC will generally run as ''​user:user'' ​while non-PHP SuEXEC will run as ''​nobody:​nobody''​.
  
-===== Enable PHP SuEXEC for LSWS native mode or OpenLiteSpeed =====+===== Enable PHP SuEXEC for LiteSpeed Web Server (Native) ​or OpenLiteSpeed =====
 To enable SuEXEC for LSWS native or on OpenLiteSpeed,​ you will need to create external apps (name should be unique and different than server level external apps and other virtual host external apps, for example, lsphp_$vhost;​ also set it to run as username:​usergroup to implement PHP SuEXEC) and script handler pointing to the newly created external app under each virtual host. To enable SuEXEC for LSWS native or on OpenLiteSpeed,​ you will need to create external apps (name should be unique and different than server level external apps and other virtual host external apps, for example, lsphp_$vhost;​ also set it to run as username:​usergroup to implement PHP SuEXEC) and script handler pointing to the newly created external app under each virtual host.
  
Line 22: Line 24:
 ==== Which process mode am I using? ==== ==== Which process mode am I using? ====
  
-  * Is the [[https://​www.litespeedtech.com/​docs/​webserver/​config/​extapps#​runOnStartUp|Run on Start Up setting]] set to ''​Yes (Daemon mode)''?​ If so, then you are running [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-daemon-mode|Daemon mode]]. If not, then you are running [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-worker|Worker mode]]. +  * Is the **[[https://​www.litespeedtech.com/​docs/​webserver/​config/​extapps#​runOnStartUp|Run on Start Up setting]]** set to ''​Yes (Daemon mode)''?​ If so, then you are running [[litespeed_wiki:php:process-mode#​daemon_mode|Daemon mode]]. If not, then you are running [[litespeed_wiki:php:process-mode#​worker_mode|Worker mode]]. 
-  * Do you have an [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​configuration|LSPHP_ProcessGroup on]] directive in your Apache configuration files? If so, then users with that configuration are using [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​suexec-processgroup|ProcessGroup mode]]. (This can be set at the server or virtual host level.) +  * Do you have an ''​[[litespeed_wiki:php:lsapi-environment-variables#​lsphp_processgroup|LSPHP_ProcessGroup on]]'' ​directive in your Apache configuration files? If so, then users with that configuration are using [[litespeed_wiki:php:process-mode#​processgroup_mode|ProcessGroup mode]]. (This can be set at the server or virtual host level.) 
-  * Is your [[https://​www.litespeedtech.com/​docs/​webserver/​config/​extapps#​instances|Instances ​setting]] set to ''​1''?​ If so, you are running ProcessGroup mode. If not, you are running Worker mode. (These setups are explained in the Environment Variables section of the [[https://​www.litespeedtech.com/​docs/​litespeed-sapi/​php-lsapi/​configuration|PHP LSAPI Configuration documentation]].)+  * Is **[[https://​www.litespeedtech.com/​docs/​webserver/​config/​extapps#​instances|Instances]]** set to ''​1''?​ If so, you are running ​[[litespeed_wiki:​php:​process-mode#​processgroup_mode|ProcessGroup mode]]. If not, you are running ​[[litespeed_wiki:​php:​process-mode#​worker_mode|Worker mode]]. These setups are explained ​further ​in [[litespeed_wiki:php:process-mode|PHP Process Modes]].)
  
  
 
litespeed_wiki/php/which_php_setup_am_i_using.1536939767.txt.gz · Last modified: 2018/09/14 15:42 by Michael Alegre