SOLVED Prevent access from direct access to shared IP

ramleaf

Member
Mar 17, 2017
6
1
3
Uruguay
cPanel Access Level
Root Administrator
Hello,
I have added an additional IP to use as a shared IP and assign it to multiple hosting accounts. Everything works fine except that if I access that IP directly through the browser it loads one of the hosting accounts.
This does not happen with the main server IP, in this case it shows the "Default Web Site Page".
How do I prevent direct access with that IP?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,519
1,030
313
cPanel Access Level
Root Administrator
Hey there! Apache always tries to load something to satisfy the request, so the best thing to do would be to create a default virtual host for each IP on the server. Details on how to configure that can be found here:

 
  • Like
Reactions: ramleaf