Skip to main content

CWP

Installation Prerequisite section helps you to install any kind of hosting panel. Primarily this guide is for CentOS Web Panel. 
Step 1: CWP/Cpanel/VestaCP Installation Prerequisite
Part 1 Disable SeLinux
Part 2 Disable Firewalld
Part 3 Set Hostname Permanently
Part 4 Disable Network Manager & Set Static IP
Part 5 Install Chrony and Configure NTP server
Part 6 Set-Up Time Zone
Part 7 Install Latest EPEL Release
Part 8 Add Swap Space to Your SSD VPS

Step 2: CWP Installation & Configuration
How to Install CentOS WebPanel (CWP7.admin ) on CentOS 7.6
Part 1: CWP Basic Configuration after Fresh Installation
Part 2: CWP Basic Configuration after Fresh Installation

Part 3: CWP: Set 'date.timezone' in PHP.INI
   /usr/local/php/php.ini
   /usr/local/cwp/php71/php.ini

Part 4: CWP: Set the 'ServerName' directive globally 
     /usr/local/apache/conf/httpd.conf
     /usr/local/apache/conf/original/httpd.conf
# vi /usr/local/apache/conf/httpd.conf
ServerRoot "/usr/local/apache"
User nobody
Group nobody
ServerAdmin admin@datahead.biz
ServerName host.datahead.biz:80
DocumentRoot "/usr/local/apache/htdocs"

# vi /usr/local/apache/conf/httpd.conf
ServerTokens Prod
ServerSignature Off
TimeOut 3600
    :x (save & quit)

DATABase:
https://www.digitalocean.com/community/questions/mysql-sql_mode-keeps-reseting
https://www.uxlinux.com/how-to-disable-mysql-strict-mode-cwp-centos-ubuntu-rhel-almalinux/
https://www.uxlinux.com/optimize-and-repair-all-mysql-database-via-cli-cwp-centos-ubuntu-el7-el8/

Check CWPSRV syntax
# /usr/local/cwpsrv/bin/cwpsrv -t
cwpsrv:the configuration file /usr/local/cwpsrv/conf/cwpsrv.conf syntax is ok
cwpsrv:configuration file /usr/local/cwpsrv/conf/cwpsrv.conf test is successful
Check apache syntax
# /usr/local/apache/bin/apachectl -t
# /usr/local/apache/bin/apachectl configtest
# /usr/local/apache/bin/httpd -t

Apache Security:
https://help.dreamhost.com/hc/en-us/articles/226327268-The-most-important-steps-to-take-to-make-an-Apache-server-more-secure

https://serverfault.com/questions/487530/find-out-what-high-cpu-usage-apache-process-is-actually-doing

CWP Templates Location:
DNS
cd /usr/local/cwpsrv/htdocs/resources/conf/dns/
cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/conf_templates
WebServer
cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/
Default Host Location
    Help:   https://bugzilla.redhat.com/show_bug.cgi?id=1374346 
                https://serverfault.com/questions/919328/is-there-any-limitations-in-using-geoip-with-bind9
                https://kb.isc.org/docs/aa-01149

Step 4: Laravel Command
https://laravel.com/docs/7.x/filesystem
http://www.laravelinterviewquestions.com/trick/how-to-clear-cache-in-laravel-odi/
https://tecadmin.net/clear-cache-laravel-5/
https://www.rit.edu/researchcomputing/instructions/Clearing-the-known_hosts-SSH-File


Step 5: User Panel Features
Login user account
Create few Sub-domain (support , erp, postfixadmin ...etc) , use directory /home/username/public_html/ and /home/username/sub-domain
Create few Email Account using parent domain
Create few Email Account using sub-domain (support)
Create Forwarder
Create Alias/Group for parent & sub-domain
Check AutoResponder
Install Wordpress on parent domain & Sub-domain & Visit
Install Some plugins to secure your WordPress Website
Install Auto SSL for subdomain from user panel , 
      If AutoSSL is not working Solution Link 1  Solution Link 2
Check Virtual Host File
   /usr/local/apache/conf.d/vhosts/
   /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts
Don’t forget to fix the permission from Admin Panel ( Go to User Account >>  Fix Permission )
Login to webmail for checking
Send email to Gmail , http://dkimvalidator.com/ & https://www.mail-tester.com/ for header checking

Step 5.1: Update PHP to 7.2.x for Presta
Remove php ioncube using php addons
Update PHP-FPM to 7.2.x
Update suPHP to 7.2.x using PHP Selector 2
Update php to 7.2.x using PHP vesion switcher
Now Configure the WebServers main Conf and WebServer Domain Conf
Update datetimezone to all php.ini ( find / -name php.ini )
Now Install Presta CMS 1.7.5.1
Install libicu intl for Presta
Don't Forget to Fix the user account permission
Apache Compiler details: http://forum.centos-webpanel.com/apache/apache-compiler/
Clear Cache Memory
#  sync; echo 1 > /proc/sys/vm/drop_caches && sync; echo 2 > /proc/sys/vm/drop_caches && sync; echo 3 > /proc/sys/vm/drop_caches


Step 6: Let'sEncypt SSL
1. Install Let'sEncypt for Server FQDN and also for Admin/User/Webmail
2. Configure Auto Renewal
3. CWP: Redirect Admin/User/Wemail panel from http to https
4. SSL Inconsistent server configuration [ Error: SSL_ERROR_RX_RECORD_TOO_LONG]
5. CWP: Auto_SSL is not working from both Admin/User Panel [Fixed]

Step 7: Install PostfixAdmin
Install PostfixAdmin 3.1 on subdomain (postfixadmin.subdomain.com)
Invalid query: Table 'postfix.vacation_notification' doesn't exist

Step 7.1: Postfix Tunning
For Spam Filtering : use DKIM, SPF, DMARC records
Repeat "send email to Gmail & https://www.mail-tester.com/ for header checking"
Postfix Tunning

Step 7.2: DKIM and DMARC Protection Guide:
https://www.gettingemaildelivered.com/how-to-set-up-dmarc-email-authentication
https://postmarkapp.com/guides/dmarc
https://postmarkapp.com/guides/dkim

Step 8:
MySQL Tunning
Secure Phpmyadmin

Step 9:
Roundcube

Comodo WAF with GUI
https://www.bullten.com/blog/installing-comodo-waf-with-gui-in-cwp/
https://www.plothost.com/kb/whitelist-ips-uris-mod-security/

Part 10: CSF
CWP: How to Install CSF on CentOS 7?
CWP: How to Enable GUI for CSF on CentOS 7?
CWP: How to Install CSF Webmin module on in CentOS 7 ?
CWP: How to Increase your Server Security using CSF Firewall on CentOS 7?

CWP: How to Allow or Block Traffic by Country in the CSF Firewall?
CWP : How to Allowing Access to Specific Ports for Specific Countries ?
CWP : How to Blocking Access to Specific Ports for Specific Countries ?
CWP: Getting CSF Firewall error after CSF Updating
CWP : Improve CSF iptables performance with IPSET

CWP : How Configure DDOS Prevention(SYNflood Protection) Settings in CSF firewall ?
CWP : How to Enable PORTFLOOD Protection using CSF firewall?
CWP: How to Configure Connection Limit Protection with CSF on CentOS 7 ?
CWP: Rate Limit Incoming Traffic using CSF Connection Tracking Option

Part 11:
SSH

Part 12: Monit
How to monitor CWP Server Services using Monit on CentOS 7.6
How to Add Let's Encrypt SSL to Monit Server on CentOS 7.6 ?

Part 13: Webmin for CWP
1.How to Install Latest Webmin 1.90 on CentOS 7.6
2.How to Fix Webmin is Excited on CentOS 7.6
3.Getting error "pam_unix(webmin:auth): authentication failure" on Latest Webmin 1.9 on CentOS 7.6 [Fixed]
4.How to add Let's Encrypt SSL certificate to Webmin
5.How to Secure Webmin using Webmin GUI on CentOS 7
6.Install Latest Usermin on CentOS 7.6 core via Webmin

Comments