praveenkv1988

Member
May 21, 2007
14
0
151
Trivandrum
When the mod_userdir is not enabled and trying to access the website using IP there is a problem.

If the code is written to include the file which is placed in document root, it looks for the file in "htdocs".

Is there a way to make it look the users "public_html" dir?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
If the IP being used is the shared IP, then that IP does point to /usr/local/apache/htdocs directory rather than any individual site's directory as the default document root. As such, you cannot have it look into individual public_html directories for the shared main IP address. mod_userdir would need to be enabled to use that shared IP along with the cPanel username.

If you do require using the IP directly, then the site would need to have a dedicated IP. If the site has a dedicated IP rather than the main shared IP, it should resolve in a browser without needing to use mod_userdir on that dedicated IP.