Pages

Friday, April 10, 2026

 How to protect Apache web server(w/ cPanel/DirectAdmin) from XMLRPC attacks


how to use this method to protect all the websites on an Apache web server.


On both cPanel and DirectAdmin servers running Apache, the file that we will use is /home/.htaccess Edit or create this file and add the blocking rule:


# content of the file /home/.htaccess

<Files "xmlrpc.php">

Require all denied

</Files>

 

How to rebuild corrupted userdata files in cPanel/WHM


cPanel uses userdata files to keep information about addon domains, parked domains, IPs, PHP versions used by accounts etc. If you came to the conclusion that the cPanel userdata files are corrupted, you can rebuild them. The process detailed below will be possible only if you have a valid httpd.conf file.

How to rebuild corrupted userdata files in cPanel/WHM
1. Log into your cPanel/WHM server with the root credentials

2. Move the existing userdata files to a new location. Use:

mv /var/cpanel/userdata /var/cpanel/userdata-original


3. Re-create the userdata directory with this command:


mkdir /var/cpanel/userdata