Allow access customer website via WHM

Kimseng VIT

Registered
Aug 5, 2019
2
0
1
Phnom Penh
cPanel Access Level
Root Administrator
Hello all,

My customer plan to move website to my hosting WHM cPanel. Because i need to verify customer website working or not before they change NS Record on domain controller so i create one account on WHM and asking my customer to upload website but i try to testing on WHM >> List Account and click on "http://ip address/~user_name" but i show the error on attachment file.

Best Regards,
Kimseng
 

Attachments

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
Hello,

It looks like you're trying to use mod_userdir with mod_userdir protections enabled or you're using something that is incompatible like CGI handler or PHP-FPM.

The best way to do this is to modify the local host file, instructions on this can be found here: Tutorial - Editing your local hosts file to preview sites

The tutorial also discusses why mod_userdir is not the preferred method for this.

If you need to use it you can ensure that it's configured by going to WHM>>Security Center>>Apache mod_userdir Tweak
  • Ensure there are no warnings about conflicts
  • Ensure that none of the sites you're trying to view are using PHP-FPM or have CGI as their handler
  • set the domain you want to check to have protection excluded
 

keat63

Well-Known Member
Nov 20, 2014
1,894
248
93
cPanel Access Level
Root Administrator
If you are a windows user edit the host file in:

c:\windows\system32\drivers\etc

Ad your IP and domain name name, something like the below

xxx.xx.xx.xxx new-domain.com

When your local PC tries to connect to new-domain.com, it will look at the hosts file first.
It will use this to resolve the location instead of using DNS.

Think of it like your own temporary DNS server.
Don't forget the modify it back when you've done.