Introduction
You may want to produce an error so no site is loaded when the server IP or IPs are accessed. This can be done with a VirtualHost for each IP on port 80 and 443 with a specific DocumentRoot. If the port is offset because NGINX is installed then the port offset needs to be set instead.
Procedure
Modify /etc/apache2/conf.d/includes/pre_virtualhost_global.conf or log into WHM, navigate to "Apache Configuration »Include Editor" and select All Versions under "Pre VirtualHost Include".
Then copy and paste the following into the file but replace 10.2.48.27 with the IP needed. The configuration can be copied and pasted multiple times and set for multiple IPs if needed.
<VirtualHost 10.2.48.27:80>
ServerName 10.2.48.27
DocumentRoot /dev/null
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
UserDir disabled
</VirtualHost>
<VirtualHost 10.2.48.27:443>
ServerName 10.2.48.27
DocumentRoot /dev/null
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
UserDir disabled
SSLEngine on
SSLCertificateFile /var/cpanel/ssl/cpanel/cpanel.pem
SSLCertificateKeyFile /var/cpanel/ssl/cpanel/cpanel.pem
SSLCertificateChainFile /var/cpanel/ssl/cpanel/cpanel.pem
</VirtualHost>
Afterward, restart Apache with
/scripts/restartsrv_httpd --hard
NOTE: The Apache error_log will log the following when the IP is accessed and can be ignored.
Forbidden: /dev/null doesn't point to a file or directory