Direct ip address access disable

Operating System & Version
Almalinux8
cPanel & WHM Version
Latest

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,517
2,607
363
cPanel Access Level
Root Administrator
Hey there! There are some ModSecurity options discussed here that could be useful:


I'm not sure there is going to be a good way to modify the vhost blocks on a cPanel server to achieve this directly with Apache.
 

bco

Registered
May 12, 2023
3
0
1
Turkey
cPanel Access Level
Root Administrator
Hey there! There are some ModSecurity options discussed here that could be useful:


I'm not sure there is going to be a good way to modify the vhost blocks on a cPanel server to achieve this directly with Apache.
Yes, I found the solution.

Thanks
 

bco

Registered
May 12, 2023
3
0
1
Turkey
cPanel Access Level
Root Administrator
Can you share what solution you decided to use?
Apache Configuration > Include Editor > Virtual Host Post > All version


<VirtualHost 0.0.0.0:80>
ServerName 0.0.0.0
DocumentRoot /usr/local/apache/htdocs
ServerAdmin [email protected]
<IfModule suphp_module>
suPHP_UserGroup nobody nobody
</IfModule>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
</VirtualHost>

<VirtualHost 0.0.0.0:443>
ServerName 0.0.0.0
DocumentRoot /usr/local/apache/htdocs
ServerAdmin [email protected]
<IfModule suphp_module>
suPHP_UserGroup nobody nobody
</IfModule>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
</VirtualHost>