{"id":648,"date":"2021-07-23T12:34:46","date_gmt":"2021-07-23T12:34:46","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/configure-or-disable-php-fpm-with-user-pools-for-easyapache-4\/"},"modified":"2021-07-23T12:34:46","modified_gmt":"2021-07-23T12:34:46","slug":"configure-or-disable-php-fpm-with-user-pools-for-easyapache-4","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/configure-or-disable-php-fpm-with-user-pools-for-easyapache-4\/","title":{"rendered":"Configure or Disable PHP-FPM with User Pools for EasyApache 4"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>This document is <strong>only<\/strong> valid for cPanel &#038; WHM version 58 and earlier. We deprecated this configuration process in cPanel &#038; WHM version 60.<\/li>\n<li>Because this document outlines deprecated functionality, cPanel Technical Support can\u2019t help you with this process.<\/li>\n<li>To configure PHP-FPM for cPanel &#038; WHM version 60 or later, read our MultiPHP Manager documentation.<\/li>\n<\/ul><\/div>\n<\/div>\n<p>The FastCGI Process Manager (PHP-FPM) implementation of FastCGI provides process management, emergency restarts, and IP address restriction. You <strong>must<\/strong> perform extra steps to use this handler with user pools on a shared server.<\/p>\n<p>For more information about how to install FastCGI and PHP-FPM, read the following documentation:<\/p>\n<ul>\n<li>PHP Handlers<\/li>\n<li>Yellowdog Updater, Modified (yum) Basics<\/li>\n<\/ul>\n<h2 id=\"set-up-pools-per-user\">Set up pools per user<\/h2>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>You can <strong>only<\/strong> configure one PHP-FPM pool per user.<\/li>\n<li>These instructions assume that your server runs EasyApache 4.<\/li>\n<li>\n<p>In the examples below, the following statements are true:<\/p>\n<ul>\n<li><code>ea-php56<\/code> and <code>ea-php70<\/code> represent the versions of PHP to use.<\/li>\n<li><code>username<\/code> represents a user on the system.<\/li>\n<li><code>example.com<\/code> represents the domain\u2019s base directory.<\/li>\n<li><code>group<\/code> represents the user\u2019s group.<\/li>\n<li><code>account<\/code> represents the user\u2019s account.<\/li>\n<li><code>virtual-host<\/code> represents the name of the virtual host.<\/li>\n<\/ul>\n<\/li>\n<\/ul><\/div>\n<\/div>\n<p>To set up PHP-FPM for a shared server, follow the steps for your PHP version:<\/p>\n<h3 id=\"php-5-6\">PHP 5.6<\/h3>\n<p>To set up user pools for an EasyApache 4 server that runs PHP version 5.6, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Run the following command as the <code>root<\/code> user to install FCGI and PHP-FPM:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">  yum install ea<span style=\"color:#f92672\">-<\/span>apache24<span style=\"color:#f92672\">-<\/span>mod_proxy_fcgi ea<span style=\"color:#f92672\">-<\/span>php56<span style=\"color:#f92672\">-<\/span>php<span style=\"color:#f92672\">-<\/span>fpm\n<\/code><\/pre>\n<\/div>\n<p>To change the PHP handler for each version to use CGI, run the following script:<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\">  <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">usr<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">local<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">bin<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">rebuild_phpconf<\/span> <span style=\"color:#f92672\">--<\/span><span style=\"color:#66d9ef\">default<\/span>=<span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span> <span style=\"color:#f92672\">--<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php55<\/span>=<span style=\"color:#a6e22e\">cgi<\/span> <span style=\"color:#f92672\">--<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span>=<span style=\"color:#a6e22e\">cgi<\/span> <span style=\"color:#f92672\">--<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php70<\/span>=<span style=\"color:#a6e22e\">cgi<\/span>\n<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Run the following command to create PHP-FPM\u2019s <code>run<\/code> directory in your home directory:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">p<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">run<\/span><span style=\"color:#f92672\">\/<\/span>\n<span style=\"color:#a6e22e\">chown<\/span> <span style=\"color:#a6e22e\">username<\/span>. <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">run<\/span><span style=\"color:#f92672\">\/<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Run the following commands to copy and rename your PHP version\u2019s <code>www.conf.example<\/code> file:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">cd<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">opt<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">root<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span>\n<span style=\"color:#a6e22e\">cp<\/span> <span style=\"color:#a6e22e\">www<\/span>.<span style=\"color:#a6e22e\">conf<\/span>.<span style=\"color:#a6e22e\">example<\/span> <span style=\"color:#a6e22e\">username<\/span>.<span style=\"color:#a6e22e\">conf<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Edit your <code>username.conf<\/code> file to include the following changes:<\/p>\n<ul>\n<li>\n<p>On line 2, change the name of the pool. We recommend that you use the username of the account:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\">; <span style=\"color:#a6e22e\">Start<\/span> <span style=\"color:#a6e22e\">a<\/span> <span style=\"color:#a6e22e\">new<\/span> <span style=\"color:#a6e22e\">pool<\/span> <span style=\"color:#a6e22e\">named<\/span> <span style=\"color:#960050;background-color:#1e0010\">'<\/span><span style=\"color:#a6e22e\">www<\/span><span style=\"color:#960050;background-color:#1e0010\">'<\/span>.\n[<span style=\"color:#a6e22e\">user<\/span>]  <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>On line 12, change the listening socket path to the directory that you created in step 2:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">listen <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">\/home\/<\/span>username<span style=\"color:#e6db74\">\/run\/<\/span>php56<span style=\"color:#f92672\">-<\/span>fpm<span style=\"color:#f92672\">.<\/span>sock<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Uncomment line 31 and line 32 and change the following parameters\u2019 values to allow the <code>init<\/code> script to set the permissions for the Unix socket:<\/p>\n<ul>\n<li>\n<p>The <code>listen.owner<\/code> parameter to the <code>username<\/code> value.\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">listen<span style=\"color:#f92672\">.<\/span>owner <span style=\"color:#f92672\">=<\/span> username<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>The <code>listen.group<\/code> parameter to the <code>nobody<\/code> value.\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">listen<span style=\"color:#f92672\">.<\/span>group <span style=\"color:#f92672\">=<\/span> nobody<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>On line 35, change the <code>user<\/code> and <code>group<\/code> targets to the name and group of the user who will own the process:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">  ; Unix user\/group of processes\n  ; Note: The user is mandatory. If the group is not set, the default user<span style=\"color:#960050;background-color:#1e0010\">'<\/span>s group\n  ;       will be used.\n  ; RPM: apache Choosed to be able to access some dir as httpd\n  user <span style=\"color:#f92672\">=<\/span> username\n  ; RPM: Keep a group allowed to write in log dir.\n  group <span style=\"color:#f92672\">=<\/span> group  <\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>On line 219, change the error log directory:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">php_admin_value[error_log] <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">\/home\/<\/span>username<span style=\"color:#e6db74\">\/logs\/<\/span>ea<span style=\"color:#f92672\">-<\/span>php56<span style=\"color:#f92672\">-<\/span>php<span style=\"color:#f92672\">-<\/span>fpm<span style=\"color:#f92672\">.<\/span>log<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>On line 225, change the PHP session directory:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">php_value[session<span style=\"color:#f92672\">.<\/span>save_path] <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">\/home\/<\/span>username<span style=\"color:#f92672\">\/<\/span>session<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Create the <code>\/home\/username\/session<\/code> directory, if it doesn\u2019t already exist, and update the <code>username<\/code> permissions. To do this, run the following commands:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">session<\/span>\n<span style=\"color:#a6e22e\">chown<\/span> <span style=\"color:#a6e22e\">username<\/span>. <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">session<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Restart the PHP-FPM service by running the following commands:<\/p>\n<ul>\n<li>CentOS 6:\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">init<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span> <span style=\"color:#a6e22e\">stop<\/span>\n<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">init<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span> <span style=\"color:#a6e22e\">start<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>CentOS 7:\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">systemctl<\/span> <span style=\"color:#a6e22e\">stop<\/span> <span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">service<\/span>\n<span style=\"color:#a6e22e\">systemctl<\/span> <span style=\"color:#a6e22e\">start<\/span> <span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">service<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Create and edit the user\u2019s Apache include directory and file:<\/p>\n<ul>\n<li>\n<p>Run the following commands to create the Apache include directories:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">p<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">apache2<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">conf<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">userdata<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">std<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#ae81ff\">2<\/span><span style=\"color:#a6e22e\">_4<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">account<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">virtual<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">host<\/span>\n<span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">p<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">apache2<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">conf<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">userdata<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ssl<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#ae81ff\">2<\/span><span style=\"color:#a6e22e\">_4<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">account<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">virtual<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">host<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Edit the <code>\/etc\/apache2\/conf.d\/userdata\/std\/2_4\/account\/virtual-host\/fpm.conf<\/code> file to include the following lines:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\">&lt;<span style=\"color:#a6e22e\">IfModule<\/span> <span style=\"color:#a6e22e\">proxy_fcgi_module<\/span>&gt;\n    <span style=\"color:#a6e22e\">ProxyPassMatch<\/span> <span style=\"color:#e6db74\">\"^\/(.*.php(\/.*)?)$\"<\/span> <span style=\"color:#e6db74\">\"unix:\/home\/username\/run\/php56-fpm.sock|fcgi:\/\/localhost\/home\/username\/public_html\/\"<\/span>\n    <span style=\"color:#a6e22e\">DirectoryIndex<\/span> <span style=\"color:#a6e22e\">index<\/span>.<span style=\"color:#a6e22e\">php<\/span>\n&lt;<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">IfModule<\/span>&gt; <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Run the following command to copy the <code>fpm.conf<\/code> file from the <code>std<\/code> directory tree to the <code>ssl<\/code> directory tree:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">cp <span style=\"color:#e6db74\">\/etc\/<\/span>apache2<span style=\"color:#e6db74\">\/conf.d\/<\/span>userdata<span style=\"color:#e6db74\">\/std\/<\/span><span style=\"color:#ae81ff\">2_4<\/span><span style=\"color:#e6db74\">\/account\/<\/span>virtual<span style=\"color:#f92672\">-<\/span>host<span style=\"color:#e6db74\">\/fpm.conf \/<\/span>etc<span style=\"color:#e6db74\">\/apache2\/co<\/span>nf<span style=\"color:#f92672\">.<\/span>d<span style=\"color:#e6db74\">\/userdata\/ss<\/span>l<span style=\"color:#e6db74\">\/2_4\/<\/span>account<span style=\"color:#e6db74\">\/virtual-host\/<\/span>fpm<span style=\"color:#f92672\">.<\/span>conf<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Run the <code>\/scripts\/rebuildhttpdconf<\/code> script.<\/p>\n<\/li>\n<li>\n<p>Run the <code>\/scripts\/restartsrv_httpd<\/code> script.<\/p>\n<\/li>\n<\/ol>\n<h3 id=\"php-7-0\">PHP 7.0<\/h3>\n<p>To set up user pools for an EasyApache 4 server that runs PHP version 7.0, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Run the following command as the <code>root<\/code> user to install FCGI and PHP-FPM:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">yum install ea<span style=\"color:#f92672\">-<\/span>apache24<span style=\"color:#f92672\">-<\/span>mod_proxy_fcgi ea<span style=\"color:#f92672\">-<\/span>php70<span style=\"color:#f92672\">-<\/span>php<span style=\"color:#f92672\">-<\/span>fpm<\/code><\/pre>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>To change the PHP handler for each version to use CGI, run the following script:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\"><span style=\"color:#e6db74\">\/usr\/<\/span>local<span style=\"color:#e6db74\">\/cpanel\/<\/span>bin<span style=\"color:#f92672\">\/<\/span>rebuild_phpconf <span style=\"color:#f92672\">--<\/span>default<span style=\"color:#f92672\">=<\/span>ea<span style=\"color:#f92672\">-<\/span>php56 <span style=\"color:#f92672\">--<\/span>ea<span style=\"color:#f92672\">-<\/span>php54<span style=\"color:#f92672\">=<\/span>cgi <span style=\"color:#f92672\">--<\/span>ea<span style=\"color:#f92672\">-<\/span>php55<span style=\"color:#f92672\">=<\/span>cgi <span style=\"color:#f92672\">--<\/span>ea<span style=\"color:#f92672\">-<\/span>php56<span style=\"color:#f92672\">=<\/span>cgi <span style=\"color:#f92672\">--<\/span>ea<span style=\"color:#f92672\">-<\/span>php70<span style=\"color:#f92672\">=<\/span>cgi<\/code><\/pre>\n<\/div><\/div>\n<\/div>\n<\/li>\n<li>\n<p>Run the following command to create PHP-FPM\u2019s run directory in your home directory:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">p<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">run<\/span><span style=\"color:#f92672\">\/<\/span>\n<span style=\"color:#a6e22e\">chown<\/span> <span style=\"color:#a6e22e\">username<\/span>. <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">run<\/span><span style=\"color:#f92672\">\/<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Run the following commands to copy and rename your PHP version\u2019s <code>www.conf.example<\/code> file:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">cd<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">opt<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">cpanel<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php70<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">root<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span>\n<span style=\"color:#a6e22e\">cp<\/span> <span style=\"color:#a6e22e\">www<\/span>.<span style=\"color:#a6e22e\">conf<\/span>.<span style=\"color:#a6e22e\">example<\/span> <span style=\"color:#a6e22e\">username<\/span>.<span style=\"color:#a6e22e\">conf<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Edit your <code>username.conf<\/code> file to include the following changes:<\/p>\n<ul>\n<li>\n<p>On line 4, change the name of the pool. We recommend that you use the username of the account.\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">; Start a new pool named <span style=\"color:#e6db74\">'www'<\/span>.\n<span style=\"color:#f92672\">[<\/span>user<span style=\"color:#f92672\">]<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>On lines 24 and 26, change the <code>user<\/code> and <code>group<\/code> targets to the name of the user that you want to own the process.\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">; Unix user\/group of processes\n; Note: The user is mandatory. If the group is not set, the default user<span style=\"color:#960050;background-color:#1e0010\">'<\/span>s group\n;       will be used.\n; RPM: apache Choosed to be able to access some dir as httpd\nuser <span style=\"color:#f92672\">=<\/span> username\n; RPM: Keep a group allowed to write in log dir.\ngroup <span style=\"color:#f92672\">=<\/span> username  <\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>On line 38, change the listening socket path to the directory that you created in step 2.\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">listen <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">\/home\/<\/span>username<span style=\"color:#e6db74\">\/run\/<\/span>php70<span style=\"color:#f92672\">-<\/span>fpm<span style=\"color:#f92672\">.<\/span>sock<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Uncomment lines 48 and 49 and change the following parameters\u2019 values to allow the <code>init<\/code> script to set the permissions for the Unix socket:<\/p>\n<ul>\n<li>Change the <code>listen.owner<\/code> parameter to the <code>username<\/code> value.<\/li>\n<li>Change the <code>listen.group<\/code> parameter to the <code>nobody<\/code> value.\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">listen.owner <span style=\"color:#f92672\">=<\/span> username\nlisten.group <span style=\"color:#f92672\">=<\/span> nobody<\/code><\/pre>\n<\/div>\n<\/li>\n<li>On line 52, change the <code>user<\/code> and <code>group<\/code> targets to the name of the user who you wish to own the process.<\/li>\n<li>On line 413, change the error log directory:\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-bash\" data-lang=\"bash\">php_admin_value<span style=\"color:#f92672\">[<\/span>error_log<span style=\"color:#f92672\">]<\/span> <span style=\"color:#f92672\">=<\/span> \/home\/username\/logs\/ea-php70-php-fpm.log<\/code><\/pre>\n<\/div>\n<\/li>\n<li>On line 419, change the PHP session directory:\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">php_value[session<span style=\"color:#f92672\">.<\/span>save_path] <span style=\"color:#f92672\">=<\/span> <span style=\"color:#e6db74\">\/home\/<\/span>username<span style=\"color:#f92672\">\/<\/span>session<\/code><\/pre>\n<\/div>\n<p><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Create the <code>\/home\/username\/session<\/code> directory, if it doesn\u2019t already exist, and update the <code>username<\/code> value\u2019s permissions. To do this, run the following commands:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">session<\/span>\n<span style=\"color:#a6e22e\">chown<\/span> <span style=\"color:#a6e22e\">username<\/span>. <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">session<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Run the following commands to stop and restart the PHP FPM service:<\/p>\n<ul>\n<li>Centos 6:\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">init<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php70<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span> <span style=\"color:#a6e22e\">stop<\/span>\n<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">init<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php70<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span> <span style=\"color:#a6e22e\">start<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>CentOS 7:\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">systemctl<\/span> <span style=\"color:#a6e22e\">stop<\/span> <span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php70<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">service<\/span>\n<span style=\"color:#a6e22e\">systemctl<\/span> <span style=\"color:#a6e22e\">start<\/span> <span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php70<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">service<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Create and edit the user\u2019s Apache include directory and file.<\/p>\n<ul>\n<li>\n<p>Run the following commands to create the Apache include directories:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">p<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">apache2<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">conf<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">userdata<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">std<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#ae81ff\">2<\/span><span style=\"color:#a6e22e\">_4<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">account<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">virtual<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">host<\/span>\n<span style=\"color:#a6e22e\">mkdir<\/span> <span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">p<\/span> <span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">apache2<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">conf<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">userdata<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ssl<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#ae81ff\">2<\/span><span style=\"color:#a6e22e\">_4<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">account<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">virtual<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">host<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>\n<p>Edit the <code>\/etc\/apache2\/conf.d\/userdata\/std\/2_4\/account\/virtual-host\/fpm.conf<\/code> file to include the following lines:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\">&lt;<span style=\"color:#a6e22e\">IfModule<\/span> <span style=\"color:#a6e22e\">proxy_fcgi_module<\/span>&gt;\n  <span style=\"color:#a6e22e\">ProxyPassMatch<\/span> <span style=\"color:#e6db74\">\"^\/(.*.php(\/.*)?)$\"<\/span> <span style=\"color:#960050;background-color:#1e0010\">\"<\/span><span style=\"color:#a6e22e\">unix<\/span>:<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">home<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">username<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">run<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">php70<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">sock<\/span>|<span style=\"color:#a6e22e\">fcgi<\/span>:<span style=\"color:#75715e\">\/\/localhost\/home\/username\/public_html\/\n<\/span><span style=\"color:#75715e\"><\/span>  <span style=\"color:#a6e22e\">DirectoryIndex<\/span> <span style=\"color:#a6e22e\">index<\/span>.<span style=\"color:#a6e22e\">php<\/span>\n&lt;<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">IfModule<\/span>&gt; <\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Run the following command to copy the <code>fpm.conf<\/code> file from the <code>std<\/code> directory tree to the <code>ssl<\/code> directory tree:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">cp <span style=\"color:#e6db74\">\/etc\/<\/span>apache2<span style=\"color:#e6db74\">\/conf.d\/<\/span>userdata<span style=\"color:#e6db74\">\/std\/<\/span><span style=\"color:#ae81ff\">2_4<\/span><span style=\"color:#e6db74\">\/account\/<\/span>virtual<span style=\"color:#f92672\">-<\/span>host<span style=\"color:#e6db74\">\/fpm.conf \/<\/span>etc<span style=\"color:#e6db74\">\/apache2\/co<\/span>nf<span style=\"color:#f92672\">.<\/span>d<span style=\"color:#e6db74\">\/userdata\/ss<\/span>l<span style=\"color:#e6db74\">\/2_4\/<\/span>account<span style=\"color:#e6db74\">\/virtual-host\/<\/span>fpm<span style=\"color:#f92672\">.<\/span>conf<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Run the <code>\/scripts\/rebuildhttpdconf<\/code> script.<\/p>\n<\/li>\n<li>\n<p>Run the <code>\/scripts\/restartsrv_httpd<\/code> script.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"disable-user-pools\">Disable user pools<\/h2>\n<p>To disable user pools, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Remove the <code>fpm.conf<\/code> file from the user\u2019s include directory with the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">rm <span style=\"color:#e6db74\">\/etc\/<\/span>apache2<span style=\"color:#e6db74\">\/conf.d\/<\/span>userdata<span style=\"color:#e6db74\">\/std\/<\/span><span style=\"color:#ae81ff\">2_4<\/span><span style=\"color:#e6db74\">\/$user\/<\/span>$domain<span style=\"color:#f92672\">\/<\/span>fpm<span style=\"color:#f92672\">.<\/span>conf<\/code><\/pre>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n        You must remove the directory before the <code>\/scripts\/rebuildhttpdconf<\/code> script will disable the include line.\n    <\/div>\n<\/div>\n<\/li>\n<li>\n<p>If the user\u2019s system does <strong>not<\/strong> contain any other includes, remove the user\u2019s include directory with the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">rmdir <span style=\"color:#e6db74\">\/etc\/<\/span>apache2<span style=\"color:#e6db74\">\/conf.d\/<\/span>userdata<span style=\"color:#e6db74\">\/std\/<\/span><span style=\"color:#ae81ff\">2_4<\/span><span style=\"color:#f92672\">\/<\/span>$user<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Remove the FPM user configuration file with the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\">rm <span style=\"color:#e6db74\">\/opt\/c<\/span>panel<span style=\"color:#e6db74\">\/ea-phpxx\/<\/span>root<span style=\"color:#e6db74\">\/etc\/<\/span>php<span style=\"color:#f92672\">-<\/span>fpm<span style=\"color:#f92672\">.<\/span>d<span style=\"color:#f92672\">\/<\/span>$user<span style=\"color:#f92672\">.<\/span>conf<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Rebuild the <code>httpd<\/code> configuration with the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\"><span style=\"color:#e6db74\">\/scripts\/<\/span>rebuildhttpdconf<\/code><\/pre>\n<\/div>\n<\/li>\n<li>\n<p>Stop and start the FPM with the commands appropriate for your version of OS:<\/p>\n<ul>\n<li>CentOS 5 and 6\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">init<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span> <span style=\"color:#a6e22e\">stop<\/span>\n<span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">etc<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">init<\/span>.<span style=\"color:#a6e22e\">d<\/span><span style=\"color:#f92672\">\/<\/span><span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span> <span style=\"color:#a6e22e\">start<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<\/li>\n<li>CentOS 7\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">systemctl<\/span> <span style=\"color:#a6e22e\">stop<\/span> <span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">service<\/span>\n<span style=\"color:#a6e22e\">systemctl<\/span> <span style=\"color:#a6e22e\">start<\/span> <span style=\"color:#a6e22e\">ea<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php56<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">php<\/span><span style=\"color:#f92672\">-<\/span><span style=\"color:#a6e22e\">fpm<\/span>.<span style=\"color:#a6e22e\">service<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<p><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Restart Apache with the following command:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-perl\" data-lang=\"perl\"><span style=\"color:#e6db74\">\/scripts\/<\/span>restartsrv httpd<\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview Warning: This document is only valid for cPanel &#038; WHM version 58 and earlier. We deprecated this configuration process in cPanel &#038; WHM version 60. Because this document outlines deprecated functionality, cPanel Technical Support can\u2019t help you with this process. To configure PHP-FPM for cPanel &#038; WHM version 60 or later, read our MultiPHP &hellip;<\/p>\n","protected":false},"author":1,"featured_media":649,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/648"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=648"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/648\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/649"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}