Error: 404 while trying to reach temporary URL on Cpanel.

One of our client was getting 404 error when he was trying to access temporary URL on Cpanel server. The url looks like this http://111.222.333.444/~domainusername/

While checking Error Logs:

root@server11 [~]#tail -f /usr/local/apache/logs/error_log

[error] [client] File does not exist: /usr/local/apache/htdocs/~username, referer:

[Thu july 23 14:21:23 2015] [error] [client] File does not exist: /usr/local/apache/htdocs/~username, referer:

This will happens while mod_userdir protection is enabled for the user nobody (DefaultHost) and it should be disabled using WHM or we can edit the below entry into httpd.conf file.

To enable enter domainusername seperated by space:

UserDir enabled user1 user2 user3

From WHM you can do it through Apache mod_userdir Tweak option.