Just setup new dedicated server, can't view sites by IP

Brian J

Registered
Oct 1, 2016
1
0
1
Atlanta
cPanel Access Level
Root Administrator
I just got a dedicated server setup, and it refuses to show me sites by IP - for example, myipaddress/~site = 404 error. I thought this was supposed to work? What am I missing?

This is obviously not my strong point - but thank you in advance for any insights you may have!
 

linux4me2

Well-Known Member
Aug 21, 2015
259
78
78
USA
cPanel Access Level
Root Administrator
In order to view sites via a temporary URL using your shared IP address then "~username", you have to have the mod_userdir tweak enabled. In WHM, go Security Center -> mod_userdir Tweak and make sure it is enabled. Note: if you are using mod_ruid2, you can't use the mod_userdir tweak.

Once you've enabled the mod_userdir tweak, if you want all your users to be able to access their sites via a temporary URL, then check the Exclude Protection box for DefaultHost (nobody).

If you want only a few of your users to be able to access their sites via a temporary URL, say during development before their DNS are set, just include their usernames in the "additional users" box on the same line as DefaultHost (nobody). The Exclude Protection box doesn't need to be checked.

The documentation for the mod_userdir tweak is at:

Apache mod_userdir Tweak - Documentation - cPanel Documentation
 
  • Like
Reactions: cPanelMichael