{"id":36,"date":"2020-05-16T18:15:20","date_gmt":"2020-05-16T18:15:20","guid":{"rendered":"http:\/\/lookouthost.com\/?p=36"},"modified":"2026-04-03T06:39:47","modified_gmt":"2026-04-03T01:09:47","slug":"setup-a-whm-cpanel-server","status":"publish","type":"post","link":"https:\/\/lookouthost.com\/blog\/setup-a-whm-cpanel-server\/","title":{"rendered":"Setup a WHM\/CPanel Server"},"content":{"rendered":"<p>This guide will tell you how to setup WHM\/Cpanel on a fresh sever. This guide is specifically for web hosting resellers as it is aim to tune\/optimize and secure the server for selling purpose.  <\/p><ol class=\"wp-block-list\"><li>SERVER PARTIION SIZE<br>Cpanel condition: swap to be 4 GB<\/li><\/ol><p>Croc Web<br>Device Mount Point Usage Status<br>\/boot \/boot 28% (133,214 of 499,492)<br>\/var\/tmp \/var\/tmp 8% (318,684 of 4,059,840)<br>\/tmp \/tmp 8% (318,684 of 4,059,840)<br>\/ \/ 78% (1,188,088,984 of 1,612,302,348)<\/p><p>All tmp are created by themselves so dedicated server with 32 GB RAM is ordered from WSI with 4GB Swap as recommended by Capnel.<\/p><ol start=\"2\" class=\"wp-block-list\"><li>FQDN<br>CREATE\/UPDATE NAMESERVER<br>srv1.fqdn.com <\/li><\/ol><p><\/p><p>Loginto New Dedi<\/p><ol start=\"3\" class=\"wp-block-list\"><li>yum update<\/li>\n\n<li>nano \/etc\/ssh\/sshd_config<br>Port 2244<br>reboot<\/li>\n\n<li>hostname srv1.fqdn.com<\/li>\n\n<li>Disable NetworkManager (ifconfig -a) for all networks<\/li><\/ol><p>systemctl stop NetworkManager.service<br>systemctl disable NetworkManager.service<br>OR for centos6<br>service NetworkManager stop<\/p><p>cd \/etc\/sysconfig\/network-scripts<br>ls<br>Open the ifcfg-eth0 and ifcfg-lo files with your preferred text editor and, if they exist, set the following keys&#8217; values: \/etc\/sysconfig\/network-scripts\/ifcfg-ethX<br>ifcfg-eth0 and ifcfg-lo OR ifcfg-eno1, ifcfg-eno2(Skipped as on boot was set as no despite being Type Ehternet it was ipv6), ifcfg-lo<br>NM_CONTROLLED=no<br>ONBOOT=yes<br>cp ifcfg-eno1 ifcfg-eno1:0<\/p><p>systemctl enable network.service<br>systemctl start network.service<br>systemctl status network<\/p><p>ip a<br>cd \/etc\/sysconfig\/network-scripts<\/p><h1 class=\"wp-block-heading\" id=\"cd-etc-sysconfig-network-scripts\">cd \/etc\/sysconfig\/network-scripts\/<\/h1><p>Centos7<\/p><h1 class=\"wp-block-heading\" id=\"cp-ifcfg-eno1-ifcfg-eno1-0\">cp ifcfg-eno1 ifcfg-eno1:0<\/h1><p>cp ifcfg-eno1:0 ifcfg-eno1:1<br>Centos 6<\/p><h1 class=\"wp-block-heading\" id=\"cp-ifcfg-eth0-ifcfg-eth0-0-63\">cp ifcfg-eth0 ifcfg-eth0:0 63<\/h1><h1 class=\"wp-block-heading\" id=\"cp-ifcfg-eth0-ifcfg-eth0-1-64\">cp ifcfg-eth0 ifcfg-eth0:1 64<\/h1><h1 class=\"wp-block-heading\" id=\"cp-ifcfg-eth0-ifcfg-eth0-2-65\">cp ifcfg-eth0 ifcfg-eth0:2 65<\/h1><p>DEVICE=&#8221;eth0&#8243;<br>BOOTPROTO=static<br>ONBOOT=yes<br>TYPE=&#8221;Ethernet&#8221;<br>IPADDR=63.141.238.166<br>NETMASK=255.255.255.224<br>GATEWAY=172.16.16.100<br>HWADDR=00:0C:29:28:FD:4C<\/p><p>DEVICE=&#8221;eth0:0&#8243; IMPORTANT<br>BOOTPROTO=static IMPORTANT<br>ONBOOT=yes<br>TYPE=&#8221;Ethernet&#8221;<br>IPADDR=172.16.16.126 IMPORTANT<br>NETMASK=255.255.255.224<br>GATEWAY=172.16.16.100<br>HWADDR=00:0C:29:28:FD:4C<\/p><p>\/etc\/init.d\/network restart<\/p><p><a href=\"https:\/\/www.tecmint.com\/create-multiple-ip-addresses-to-one-single-network-interface\/IPADDR=63.141.238.162IPADDR=63.141.238.163IPADDR=63.141.238.164\">https:\/\/www.tecmint.com\/create-multiple-ip-addresses-to-one-single-network-interface\/IPADDR=63.141.238.162IPADDR=63.141.238.163IPADDR=63.141.238.164<\/a><\/p><ol start=\"7\" class=\"wp-block-list\"><li>cd \/home &amp;&amp; curl -o latest -L https:\/\/securedownloads.cpanel.net\/latest &amp;&amp; sh latest<br>Run the one time url given by cpanel<\/li><\/ol><p><a href=\"https:\/\/www.cyberciti.biz\/faq\/howto-setting-rhel7-centos-7-static-ip-configuration\/\">https:\/\/www.cyberciti.biz\/faq\/howto-setting-rhel7-centos-7-static-ip-configuration\/<\/a><\/p><p>DNS Zone<br>Add a DNS ZONE<br>63.141.238.162 fqdn.com \/\/To resolve Nameserver is not authoritative error<\/p><p>Add a DNS ZONE<br>63.141.238.163 ns4.fqdn.com<br>Edit DNS Zone<br>ns4.fqdn.com<\/p><p>I added A records as well NS A records and NS records inside the DNS of main damain of reseller. then it was resolved.<\/p><h2 class=\"wp-block-heading\" id=\"mysql\"><strong>MySQL<\/strong><\/h2><ol start=\"8\" class=\"wp-block-list\"><li>Upgrage to MariaDB before installing CL MysqlGoverner otherwise run<br>To remove MySQL Governor :<\/li><\/ol><p>$ \/usr\/share\/lve\/dbgovernor\/mysqlgovernor.py &#8211;delete<\/p><p>\/usr\/share\/lve\/dbgovernor\/mysqlgovernor.py &#8211;install<\/p><p><a href=\"https:\/\/lookouthost.com\/open-remote-connection-port-on-mysql\/\">Open Remote Connection Port on MySQL \/ MariaDB<\/a><\/p><ol start=\"9\" class=\"wp-block-list\"><li>Feature Manager \u00bbEdit Feature ListDocumentation<\/li>\n\n<li>Install CL<br>cd \/root<br>$ wget https:\/\/repo.cloudlinux.com\/cloudlinux\/sources\/cln\/cldeploy<br>If you have activation key:<br>$ sh cldeploy -k<br>If you have IP-based license:<br>$ sh cldeploy -i<br>$ reboot<\/li><\/ol><p>Run Wizard and install CageFS, LSAPI,MysqlGoverner<\/p><ol start=\"9\" class=\"wp-block-list\"><li>MYSQL MYCNF File in Guides folder<br>max_connections=150<br>service mysql restart<\/li><\/ol><p>pid-file=\/var\/run\/mysqld\/mysqld.pid This one not worked.<\/p><ol start=\"10\" class=\"wp-block-list\"><li>Install CLAMAV THEN ConfigServer cxs Script Installer<br>cd \/usr\/src<br>rm -f cxs*<br>wget https:\/\/download.configserver.com\/cxsinstaller.tgz<br>tar -xzf cxsinstaller.tgz<br>perl cxsinstaller.pl ipv4<br>rm -fv cxsinstaller.*<\/li><\/ol><p>Run Wizard<br>Enable IP Reputation after cSF firewall<\/p><p>You should be able to edit<br>Code: Select all<br>\/etc\/cxs\/cxs.ignore<br>Then add:-<br>Code: Select all<br>hdir:\/public_html\/wp-content\/cache\/supercache<br><code>hdir<\/code> is relative to the users home folder.<\/p><p>Then restart cxs:-<br>Code: Select all<br>service cxswatch restart<\/p><ol start=\"11\" class=\"wp-block-list\"><li>ConfigServer Security &amp; Firewall (csf)<br>cd \/usr\/src<br>rm -fv csf.tgz<br>wget https:\/\/download.configserver.com\/csf.tgz<br>tar -xzf csf.tgz<br>cd csf<br>sh install.sh<\/li><\/ol><p>Next, test whether you have the required iptables modules:<\/p><p>perl \/usr\/local\/csf\/bin\/csftest.pl<\/p><p>Resutl all ok<\/p><p>Enable Firewall<br>Check Basic Security<br>Change incoming outgoing TCP_IN &amp; TCP_OUT port as of your ssh port.<\/p><ol start=\"12\" class=\"wp-block-list\"><li>Remove All PHP versions from EA4.<\/li><\/ol><p>Dealing with cPanel\u2019s MultiPHP and CloudLinux\u2019s PHP Selector.<br>July 8th, 2018 \u2014 whplus<br>If you are using PHP-FPM you cannot use Cloudlinux\u2019s PHP selector so you may want to scrap PHP selector off the bat if that is the case, unless you plan on only using PHP-FPM for some account and not all.<\/p><p>If PHP-FPM isn\u2019t a worry, then what I would recommend you doing is going into:<\/p><p>WHM &gt; EasyApache4<\/p><p>Installed CL+OPCACHE+Modlasapi+All PHP (Then customised ioncube for php)<\/p><p>Then go into<\/p><p>WHM &gt; CloudLinux LVE Manager &gt; Selector<\/p><p>Set your \u2018Default php version\u2019 to PHP 7.2(not native).<\/p><p>Then below that, I personally uncheck \u201cnative\u201d all together.<\/p><p>at the very bottom click the \u201cPanel Default\u201d option and click \u201cSave\u201d.<\/p><p>This will select all the PHP extensions you chose for the PHP version in EasyApache.<\/p><p>You will want to do this for each PHP version there.<\/p><p>Next, go to<\/p><p>WHM &gt; MultiPHP Manager<\/p><p>Make sure you set \u201cSystem PHP Version\u201d to EA-PHP70 (or whichever EA version you chose in EasyApache).<\/p><p>Make sure ALL cPanel accounts are set to the inherited version of PHP. This will make sure all cPanel accounts are now only able to use PHP versions from Cloudlinux\u2019s PHP Selector.<\/p><p>I would also go to<\/p><p>WHM &gt; Feature Manager<\/p><p>Edit your default and other feature list\u2019s that you use and disable both the:<\/p><p>MultiPHP INI Editor<br>MultiPHP Manager<\/p><figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-whplus-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"KRi8KNp6Of\"><a href=\"https:\/\/www.whplus.com\/blog\/2018\/07\/08\/dealing-with-cpanels-multiphp-and-cloudlinuxs-php-selector.html\">Dealing with cPanel&#8217;s MultiPHP and CloudLinux&#8217;s PHP Selector.<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Dealing with cPanel&#8217;s MultiPHP and CloudLinux&#8217;s PHP Selector.&#8221; &#8212; Whplus Blog\" src=\"https:\/\/www.whplus.com\/blog\/2018\/07\/08\/dealing-with-cpanels-multiphp-and-cloudlinuxs-php-selector.html\/embed#?secret=Avhwe69oFk#?secret=KRi8KNp6Of\" data-secret=\"KRi8KNp6Of\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure><ol start=\"11\" class=\"wp-block-list\"><li><br>nano \/opt\/alt\/php51\/etc\/php.ini<\/li><\/ol><p>Change the already existing options. enable_dl = Off<br>disable_functions = show_source, system, shell_exec, passthru, exec, popen, proc_open<\/p><p>We are often asked how to prevent particular php function from being used by all clients. This is especially true about functions like exec, passthru, etc\u2026 This is something that can be easily done with php-selector. Your customers are only allowed to modify directives listed in \/etc\/cl.selector\/php.conf file. For example if you want to block system command like &#8216;exec&#8217; for php53 you have to add &#8216;disable_functions=exec&#8217; in \/opt\/alt\/php53\/etc\/php.ini file. As long as this directive is absent in \/etc\/cl.selector\/php.conf file, users will not be able to use &#8216;exec&#8217; in their scripts.<\/p><p>Do you want a quick check of what directives your users may customize? Execute the following command as root on your server:<\/p><h1 class=\"wp-block-heading\" id=\"grep-directive-etc-cl-selector-php-conf\">grep Directive \/etc\/cl.selector\/php.conf<\/h1><p>Yet, trying to secure your hosting with php.ini is wrong approach. It might work for php processes, but it will not work for CGI scripts. The secure environment is already established by CageFS which limits what processes can see or do to only safe actions.<\/p><p>Install a Node.js application<br>yum install lvemanager lve-utils ea-apache24-mod-alt-passenger<\/p><ol start=\"10\" class=\"wp-block-list\"><li>Install Imunify AV<br>wget https:\/\/repo.imunify360.cloudlinux.com\/defence360\/imav-deploy.sh<br>bash imav-deploy.sh<\/li>\n\n<li>Installation using an SSH client such as Terminal or Putty<br>HOST_API_KEY will look similar to 56yt8x9s987dfy4324bnv.<br>\u2018YOUR_COMPANY_NAME\u2019 should be wrapped in quotes like so \u2018Awesome Hosting\u2019<br>bash&lt;(curl -s https:\/\/raw.githubusercontent.com\/Clouflare\/Cloudflare-Cpanel\/master\/cloudflare.install.sh) -k 0ed0828a859f2de15fbd2d5c3bedf391 -n &#8216;Host Mayo&#8217;<\/li><\/ol><p>bash &lt;(curl -s https:\/\/raw.githubusercontent.com\/cloudflare\/CloudFlare-CPanel\/master\/cloudflare.install.sh) -k 0ed0828a859f2de15fbd2d5c3bedf391 -n &#8216;Host Mayo&#8217;<\/p><ol start=\"11\" class=\"wp-block-list\"><li>Nginx<br>cd \/; rm -f engintron.sh; wget &#8211;no-check-certificate https:\/\/raw.githubusercontent.com\/engintron\/engintron\/master\/engintron.sh; bash engintron.sh install<\/li>\n\n<li>Apache Optimisation<br>curl -sL https:\/\/raw.githubusercontent.com\/richardforth\/apache2buddy\/master\/apache2buddy.pl | sudo perl<br>curl -sL apachebuddy.pl | perl Not working on nginx<br>Max Request Workers 200 (Dont know why but error under apache log AH00286: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting<\/li><\/ol><p>We had the same problem on Apache 2.4.6. After monitoring the server and adjusting the setting for several hours it appears to us that Apache may have a bug. What appears to happen is that the server processes occasionally goes into the G state (Gracefully finishing) and restarts to accept new requests, that&#8217;s normal. What is not normal is that for some reason this can take up to a few minutes to restart. If you only have a few server process running and they all go into the G state at the same time then your scoreboard fills up and you won&#8217;t be able to server any more requests.<\/p><p>What we did was increase the number of servers so there is a less of a chance that they will all go into the G state at the same time. Also make sure you allocate at least 25 threads (MaxRequestWorkers) for each server process because that appears to be the default (i.e. if 5 Servers x 25 ThreadsPerChild = 125 MaxRequestWorkers). You can change ThreadsPerChild if you like, we left it at default. If you don&#8217;t allocate enough threads the additional servers will not start. We left MinSpareThreads at the default value which is 25 and the default for MaxSpareThreads which is 75. If you do modify these settings, the value for MaxSpareThreads must be greater than or equal to the sum of MinSpareThreads and ThreadsPerChild. Also MaxRequestWorkers must be equal to or less than the ServerLimit.<\/p><ol class=\"wp-block-list\"><li>I change apache from event mpm to worker mpm and my server problem solved.<\/li>\n\n<li>Switch to MPM Prefork<br>mod_mpm_event<\/li><\/ol><p>Apache MPMs \u2013 Prefork vs Worker vs Event<br>By default, Apache servers typically have 3 threads available:<\/p><p>Prefork<\/p><p>Implements a non-threaded, pre-forking web server.<br>The default one, most stable and also compatible with older software. Unfortunately, also the slowest.<br>I\u2019m guessing it\u2019s called that because it\u2019s the original version before they forked off into the other versions.<br>You will almost always find this one installed by default as many companies are too lazy to reconfigure hundreds of their servers. There\u2019s also a shady skepticism that they don\u2019t want your server to perform that well since they want to upsell you to a bigger server sooner.<br>Worker<\/p><p>Multi-Processing Module implementing a hybrid multi-threaded multi-process web server.<br>Faster than prefork and can handle more visitors.<br>Event<\/p><p>A variant of the worker MPM with the goal of consuming threads only for connections with active processing.<br>The fastest MPM and considered least stable\u2026although fine for most people in real-world practices.<br>Uses the least resources and can handle the most visits.<\/p><p>An effective method used by the administrators is the reverse proxying method.<br>Here Nginx is served as a static web server front and Apache processing the back end utilizing the advantages of two web servers to great effect.<br>Nginx acts as a web traffic proxy serving all static contents like CSS, JS, images etc. by default.<br>This significantly reduces the CPU\/RAM resources consumed by Apache. Apache serves the dynamic contents like PHP, PERL, etc.<\/p><h2 class=\"wp-block-heading\">Enable HTTP\/2 in Cpanel Server<\/h2><p>The HTTP\/2 increases the speed as well as security. <\/p><p>To Install or uninstall the&nbsp;<code>mod_http2<\/code>&nbsp;Apache module with WHM\u2019s&nbsp;<a href=\"https:\/\/docs.cpanel.net\/whm\/software\/easyapache-4-interface\"><em>EasyApache 4<\/em><\/a>&nbsp;interface (<em>WHM &gt;&gt; Home &gt;&gt; Software &gt;&gt; EasyApache 4<\/em>). If your server requires that you run websites as the user, you must also install the&nbsp;<code>mod_suexec<\/code>&nbsp;Apache module. Check if http2 is enabled using following website.<\/p><figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/geekflare.com\/tools\/tests\n<\/div><\/figure><p>Q. Will it work with CloudFlare?<br>A. Yes, but there is a minor gotcha. You need to adjust your &#8220;custom_rules&#8221; Nginx configuration file a bit.<br>When you open that file via Engintron&#8217;s WHM app, you&#8217;ll see examples of the rules to add for Engintron to work seamlessly with CloudFlare.<br>To briefly explain the process, you need to set your server&#8217;s shared (main) IP and\/or any additional dedicated IPs matching certain domains<br>(everything is documented with examples in there).<\/p><p>For Memcache<br>chmod +x \/usr\/local\/src\/engintron\/utilities\/install_memcached_in_cpanel_ea4.sh<br>\/usr\/local\/src\/engintron\/utilities\/install_memcached_in_cpanel_ea4.sh<\/p><p>Edit your custom_rules for Nginx<br>set $PROXY_DOMAIN_OR_IP &#8220;63.141.238.162&#8221;; # Use your cPanel&#8217;s shared IP address<\/p><p><strong>*<\/strong> If your server has a single shared IP ONLY and you wish to use CloudFlare for any (or all) of your sites you will have to specify this shared IP address below otherwise you&#8217;ll get errors from CloudFlare. This change will simply tell Nginx to skip DNS resolving and simply forward traffic to the shared IP.<\/p><p>Within your &#8220;Custom Rules&#8221; file, add the following line if all your sites on the shared (main) IP of your server are on CloudFlare:<\/p><p>set $PROXY_DOMAIN_OR_IP &#8220;XXX.XXX.XXX.XXX&#8221;; # Use your cPanel&#8217;s shared IP address here<\/p><p>set $PROXY_DOMAIN_OR_IP &#8220;63.141.238.162&#8221;; # Use your cPanel&#8217;s shared IP address<br>Only using one ip lets see.<\/p><h2 class=\"wp-block-heading\" id=\"restrict-access-to-ports-8080-8443-used-by-apache-only-for-nginx\">Restrict access to ports 8080 &amp; 8443 used by Apache only for Nginx<\/h2><p><em>(originally posted by Engintron user <a href=\"https:\/\/github.com\/speegs\">@speegs<\/a> in Engintron&#8217;s Issues)<\/em><\/p><p>To restrict access to ports 8080 &amp; 8443 used by Apache only for Nginx, follow these steps:<\/p><ol class=\"wp-block-list\"><li>Install ConfigServer Firewall (CSF) from <a href=\"https:\/\/configserver.com\/cp\/csf.html\">https:\/\/configserver.com\/cp\/csf.html<\/a> &#8211; it&#8217;s the best IPTables GUI for cPanel (and not only)!<\/li>\n\n<li>Edit the file \/etc\/csf\/csf.allow (either via terminal or via CSF&#8217;s WHM app) and append these lines:(Fireweall Allow ips)<\/li><\/ol><pre class=\"wp-block-code\"><code>tcp|in|d=8080|s=127.0.0.1 # The loopback address\ntcp|in|d=8080|s=63.141.238.162 # Replace 1.2.3.4 with your server's shared IP - if you have multiple IPs, clone this line and edit the IP\ntcp|in|d=8080|s=63.141.238.163 # Replace 1.2.3.4 with your server's shared IP - if you have multiple IPs, clone this line and edit the IP\n\ntcp|in|d=8443|s=127.0.0.1 # The loopback address\ntcp|in|d=8443|s=63.141.238.162 # Replace 1.2.3.4 with your server's shared IP - if you have multiple IPs, clone this line and edit the IP\ntcp|in|d=8080|s=63.141.238.163 # Replace 1.2.3.4 with your server's shared IP - if you have multiple IPs, clone this line and edit the IP<\/code><\/pre><ol start=\"3\" class=\"wp-block-list\"><li>Edit \/etc\/csf\/csf.deny (either via terminal or via CSF&#8217;s WHM app) and append this line: (Fireweall deny ips)<\/li><\/ol><pre class=\"wp-block-code\"><code># Block all connections to port 8080 except those already allowed in csf.allow\ntcp|in|d=8080|s=0.0.0.0\/0 # do not delete\n# Block all connections to port 8443 except those already allowed in csf.allow\ntcp|in|d=8443|s=0.0.0.0\/0 # do not delete<\/code><\/pre><p>EXCESSIVE PROCESSES<br>CT_LIMIT = 150 Default: 0 [0 or 10-1000]<br>CT_PERMANENT = ON<br>PT_USERMEM = 1024 Default: 256 [0-1024]<\/p><p>NFS for file sharing. No harm in disabling but dont need to as per cpanel special due to quota but I disabled it<br>You can disable them by running the following commands as root:<\/p><p>systemctl disable rpcbind<\/p><p>Mailman Excessive Resources<br>added the following to csf.pignore<\/p><p>pcmd:\/usr\/local\/cpanel\/3rdparty\/bin\/python \/usr\/local\/cpanel\/3rdparty\/mailman\/bin\/qrunner.*<br>pcmd:\/usr\/local\/cpanel\/3rdparty\/bin\/python \/usr\/local\/cpanel\/3rdparty\/mailman\/bin\/mailmanctl.*<\/p><p>Also add (tHE BELOW ONE I FOUND OK) ALREADY IN CSF.PGINORE FILE<br>pcmd:\/usr\/bin\/python \/usr\/local\/cpanel\/3rdparty\/mailman\/bin\/mailmanctl.*<br>pcmd:\/usr\/bin\/python \/usr\/local\/cpanel\/3rdparty\/mailman\/bin\/qrunner.*<br>cmd:spamd child<\/p><p>ADD THIS FOR Memcache<br>exe:\/usr\/bin\/memcached<\/p><p>NFS for file sharing<br>rpcbind is a close analog of BIND I think WP uses this for remote procedure calls using xml. Anyways looks a legit processor so disabling its execution alert.<br>pcmd:\/sbin\/rpcbind.*<\/p><p>For NodeJS10<br>exe:\/opt\/alt\/alt-nodejs10\/root\/usr\/bin\/node<br>or exe\/home\/thereapn\/.nvm\/versions\/node\/v13.12.0\/bin\/node<\/p><p>If you use Cpanel &amp; easy apache 3 then the location is the second set. If you use easy apache 4 then it is the first set<\/p><ol start=\"10\" class=\"wp-block-list\"><li>Install Comodo WAF<br>https:\/\/waf.comodo.com\/user\/cwaf_revisions<br>cd \/root<br>wget https:\/\/waf.comodo.com\/cpanel\/cwaf_client_install.sh<br>bash \/root\/cwaf_client_install.sh Check : http:\/\/www.rustcollegesports.com\/?a=b%20AND%201=1<\/li>\n\n<li>Install clamav<\/li>\n\n<li>Install Solr<\/li>\n\n<li>Why Mod_lsapi<br>https:\/\/www.cloudlinux.com\/mod-lsapi Better than suexe<br>drop-in replacement for SuPHP, FCGID, RUID2, and ITK.<br>Doesn&#8217;t suffer from stability issues in process management like PHP FPM and mod_fcgid.<br>Includes the full benefits of opcode caching.<br>PHP-FPM not only provides better security than suPHP, but it also processes PHP scripts much more efficiently than suPHP<br>DSO(mod_php)&gt;suPHP&gt;FastCGI (FCGI)&gt;PHP-FPM&gt;Mod_lsapi<\/li>\n\n<li>Installing Softaculous<br>Step 1: Enable IonCube<br>wget -N http:\/\/files.softaculous.com\/install.sh<br>chmod 755 install.sh<br>.\/install.sh<br>WHM &gt; Plugins (Add-Ons on older versions than 11) &gt; Softaculous \u2013 Instant Installs<br>Tweak Settings enable ioncube&#8217;<\/li><\/ol><p>Bult profitl for EA for CL+Mod_lsapi+OPCACHE+IONCE10 php7,71,72,+NodeJS<\/p><ol start=\"15\" class=\"wp-block-list\"><li>Install Kernel Monitor by CL and sys-snap.pl script Both to see reason for server crashing.<\/li><\/ol><p>Imunify MYSQL NGINX MEMCACHE Softaculous cloudflare<\/p><p>ERROR: INSTALL COMODO FIREWALL BEFORE NGINX<br>ERROR 2: RESELLER ACL TO BE CREATED AND SET AGAIN UNDER RESELLER PRIVILEGES<\/p><ol start=\"15\" class=\"wp-block-list\"><li>Stop CPhulk<br>display_errors = off<br>allow_url_fopen = On<br>asp_tags = off<br>display_errors = off<br>enable_dl = on<br>file_uploads = on<br>max_execution_time 30 default 90<br>max_input_time = -1<br>memory_limit = 128<br>post_max_size = 8M<br>safe_mode = on<\/li><\/ol><p>register_argc_argv = OFF instead of on<br>serialize_precision = 100 instead of -1<br>ereg not enabled<br>gmp<br>mcrypt The PHP developers deprecated mcrypt in version 7.1, and removed support in version 7.2. Applications should use either sodium or openssl for encryption needs.<\/p><p>mhash<\/p><p>sslv3 not enabled due to poodle attack<br>Registered Stream Filters: mcrypt.<em>, mdecrypt.<\/em><\/p><ol start=\"15\" class=\"wp-block-list\"><li>Stop email notification of Expired SSL of Users.<br>Home \u00bbSSL\/TLS \u00bbManage AutoSSLDocumentation memory_limit = 1024M<br>post_max_size = 512M<br>upload_max_filesize = 256M<br>max_execution_time = 300. max_input_vars = 3000 Not set Its depend on server settings but there is one thing always remember while setting upload_max_filesize &lt;= post_max_size if you are not doing that will be throws an error.<\/li><\/ol><p>For example, Your configuration allows user to upload 50MB file but you post_max_size is 20MB.That mean you request doesn&#8217;t fullfill because you can post only 20MB for single request.<\/p><p>Recommandations<\/p><p>To upload large files, post_max_size value must be larger than upload_max_filesize.<br>memory_limit should be larger than post_max_size<br>Guide line of PHP offical site<\/p><p>http:\/\/php.net\/manual\/en\/ini.core.php#ini.post-max-size<br>Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize.<br>Generally speaking, memory_limit should be larger than post_max_size.<\/p><p>I think it is unlikely that your email account is currently compromised. (But keep checking, anything can happen in the future \ud83d\ude00 )<\/p><p>You can use the Exim Blacklist to refuse all SMTP traffic from an IP<br>WHM &gt;&gt; Service Configuration &gt;&gt; Exim Configuration Manager<br>Basic Editor<br>Access Lists<br>Blacklisted SMTP IP addresses (IP addresses from which SMTP connections are dropped unconditionally)<\/p><p>Install SSL for other domains<br>vps.fqdn.com CAA 1 issue \u201cletsencrypt.org\u201d<\/p><p>For any questions please ask in the comment section or in our forum.<\/p><h2 class=\"wp-block-heading\" id=\"install-softaculous\"><strong>Install Softaculous<\/strong><\/h2><pre class=\"wp-block-preformatted\">wget -N http:\/\/files.softaculous.com\/install.sh\nchmod 755 install.sh\n.\/install.sh\n\n\n<\/pre><pre id=\"block-2a42cea8-3f6a-4dab-84e0-2fbb0c16bb1d\" class=\"wp-block-preformatted\"><strong>Security\n<\/strong><\/pre><pre id=\"block-89d6b949-9562-4952-82d2-848ba25dede8\" class=\"wp-block-preformatted\">Change SSH port from 22 to 2233 or anything else in centos.\n[root@srv ~]# nano \/etc\/ssh\/sshd_config\n<\/pre><figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"669\" src=\"https:\/\/lookouthost.com\/wp-content\/uploads\/2021\/02\/Screenshot-2021-02-08-185336.png\" alt=\"\" class=\"wp-image-400\" srcset=\"https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2021\/02\/Screenshot-2021-02-08-185336.png 911w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2021\/02\/Screenshot-2021-02-08-185336-600x441.png 600w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2021\/02\/Screenshot-2021-02-08-185336-300x220.png 300w, https:\/\/lookouthost.com\/blog\/wp-content\/uploads\/2021\/02\/Screenshot-2021-02-08-185336-768x564.png 768w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><\/figure><p><strong>Install CpCleaner<\/strong><\/p><p>Features:<\/p><ul class=\"wp-block-list\"><li>Clean out files by extensions or name.<\/li>\n\n<li>Clean out the &#8220;tmp&#8221; and &#8220;.trash&#8221; folders.<\/li>\n\n<li>Support cPanel, cPanel with CloudLinux. CentOS 5\/6\/7.<\/li><\/ul><p>Go To http:\/\/www.gk-root.com\/GK-Apps\/CpCleaner\/.<\/p><h5 class=\"wp-block-heading\" id=\"Installation\">Installation<\/h5><p>Run the following shell commands as root via SSH:<\/p><pre class=\"wp-block-code\"><code>wget -O cpc-1.0.3.tar \"http:\/\/store.gk-root.com\/dl.php?type=d&amp;id=233\"\ntar -xf cpc-1.0.3.tar\ncd cpc-1.0.3\nsh cpc-installer -install\ncd ..\nrm -Rfv cpc-1.0.3\/ cpc-1.0.3.tar\n<\/code><\/pre><hr class=\"wp-block-separator has-css-opacity\"\/><h3 class=\"wp-block-heading\">Enable &#8220;Send Mail from Dedicated IP&#8221; in WHM<\/h3><p>This is the most important step. Without this, WHM will continue to use the main server IP (<strong>23.160.56.81<\/strong>) for the actual handshake with other mail servers.<\/p><ol start=\"1\" class=\"wp-block-list\"><li>Log in to <strong>WHM<\/strong>.<\/li>\n\n<li>Go to <strong>Service Configuration<\/strong> > <strong>Exim Configuration Manager<\/strong>.<\/li>\n\n<li>Click on the <strong>Basic Editor<\/strong> tab.<\/li>\n\n<li>Switch to the <strong>Reference<\/strong> tab (or search for &#8220;IP&#8221;).<\/li>\n\n<li>Find the setting: <strong>&#8220;Send mail from the account\u2019s IP address&#8221;<\/strong>.<\/li>\n\n<li>Change this to <strong>On<\/strong>.<\/li>\n\n<li>Scroll to the bottom and click <strong>Save<\/strong>.<\/li><\/ol><p>yum install unbound -y # For AlmaLinux\/CentOS <\/p><p>systemctl enable unbound <\/p><p>systemctl start unbound<\/p><ol start=\"1\" class=\"wp-block-list\"><li>Open the file: <code>nano \/etc\/unbound\/unbound.conf<\/code><\/li>\n\n<li>Look for the <code>server:<\/code> section and find\/add these lines:<\/li><\/ol><p>Plaintext<\/p><pre class=\"wp-block-code\"><code>server:\n    interface: 127.0.0.1\n    port: 5353\n    access-control: 127.0.0.0\/8 allow\n    do-ip6: no\n\nAdd port in imunify<\/code><\/pre><h5 class=\"wp-block-heading\" id=\"Update\">Update<\/h5><p>Run the update by the following shell commands as root:<\/p><pre class=\"wp-block-code\"><code>\/usr\/local\/cpanel\/base\/3rdparty\/CpCleaner\/conf\/update\n<\/code><\/pre><h2 class=\"wp-block-heading\">Section 2 Tweaking WHM Server<\/h2><p><a href=\"https:\/\/lookouthost.com\/increase-upload-size-in-phpmyadmin-on-cpanel-server\/\" data-type=\"post\" data-id=\"1203\">Increase upload size in PHPMYADMIN for cPanel Accounts<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>This guide will tell you how to setup WHM\/Cpanel on a fresh sever. This guide is specifically for web hosting resellers as it is aim to tune\/optimize and secure the server for selling purpose. Croc WebDevice Mount Point Usage Status\/boot \/boot 28% (133,214 of 499,492)\/var\/tmp \/var\/tmp 8% (318,684 of 4,059,840)\/tmp \/tmp 8% (318,684 of 4,059,840)\/ \/ 78% (1,188,088,984 of 1,612,302,348) All tmp are created by themselves so dedicated server with 32 GB RAM is ordered from WSI with 4GB Swap as recommended by Capnel. Loginto New Dedi systemctl stop NetworkManager.servicesystemctl disable NetworkManager.serviceOR for centos6service NetworkManager stop cd \/etc\/sysconfig\/network-scriptslsOpen the ifcfg-eth0&hellip; <\/p>\n","protected":false},"author":1,"featured_media":37,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,5],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-whm-cpanel"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":1,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":1555,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/posts\/36\/revisions\/1555"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/media\/37"}],"wp:attachment":[{"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lookouthost.com\/blog\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}