SOLVED After Cpanel installation web page files redirecting to 404

Operating System & Version
Ubuntu 20 Lts
cPanel & WHM Version
108 Build 14

sujeeshsh

Member
Mar 23, 2023
9
2
3
Kerala
cPanel Access Level
Website Owner
Hi,

Successfully installed cpanel, after intallation database and files uploaded. When i tried to open ip-addess/filename(eg: uploaded test.php file and tried to access with IP - http://117.XXX.XX.XX/test.php ) it is showing default cPanel 404 page. Checked the case with .htaccess file and Basic WebHost Manager® Setup settings. Still same issue exists.
I have attached the screenshot.
Please help to resolve this.

Thank you,
Sujeesh S
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
947
425
363
cPanel Access Level
DataCenter Provider
Unless you have the site assigned to a dedicated IP, that's not going to work. By default the main IP is shared, so Apache does not know what site you want. If it's a shared IP, edit your computers local host file and put an entry in for the site. Just remember to remove it when you are done. On Windows the host file will be in \Windows\System32\Drivers\etc The hosts file is just a text file, but you'll need to edit the admin file with administrator permissions.

You just add a line at the bottom like:

177.##.##.## example.com www.example.com

That tells your computer to override DNS and go to 177.##.##.## for example.com and www.example.com
 
  • Like
Reactions: sujeeshsh and cPRex

sujeeshsh

Member
Mar 23, 2023
9
2
3
Kerala
cPanel Access Level
Website Owner
Unless you have the site assigned to a dedicated IP, that's not going to work. By default the main IP is shared, so Apache does not know what site you want. If it's a shared IP, edit your computers local host file and put an entry in for the site. Just remember to remove it when you are done. On Windows the host file will be in \Windows\System32\Drivers\etc The hosts file is just a text file, but you'll need to edit the admin file with administrator permissions.

You just add a line at the bottom like:

177.##.##.## example.com www.example.com

That tells your computer to override DNS and go to 177.##.##.## for example.com and www.example.com
Thank You for your response . I have tested it and working fine now :) Thank you again.. have a great day!
 
  • Like
Reactions: cPRex

sujeeshsh

Member
Mar 23, 2023
9
2
3
Kerala
cPanel Access Level
Website Owner
Depending on your server's configuration, you may also be able to visit ipaddress/~username, where "username" is simply the username of the cPanel account you're working with.

However, the solution provided by @ffeingol provides a better testing experience in the browser.
Yes, his reply was perfect. I tried that and working fine now.
 
  • Like
Reactions: cPRex