How to to disable the ~username method of vewing a website?

jmlopez

Member
Registered
Joined
Jul 11, 2016
Messages
24
Points
3
Hi everyone,

On my hosting I can run this url

my_IP_address/~username
username is the account I created in my hosting control panel. How to disable ~username of viewing a website from the IP address?

Your help is appreciated!
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Turn off mod_userdir in apache.

Assuming this is a cPanel server:

Login to WHM

Main > Security Center > Apache mod_userdir Tweak

From here, you can select which accounts you want to enable for mod_userdir
 

jmlopez

Member
Registered
Joined
Jul 11, 2016
Messages
24
Points
3
Turn off mod_userdir in apache.

Assuming this is a cPanel server:

Login to WHM

Main > Security Center > Apache mod_userdir Tweak

From here, you can select which accounts you want to enable for mod_userdir
I will check it in my whm. I didn't think it has an option like this in WHM.

its very simple run the below command:
Code:
UserDir disabled
and if you want only specific users to be enabled run the below command.
Code:
UserDir enabled myuser1 myuser2 myuser3
to disable specific users run the command below:
Code:
UserDir disabled myuser1 myuser2 myuser3
Can I run these commands at root?

and it will work for all types of hosting control panel?
 
Newer Threads
Replies
8
Views
2,272
Replies
6
Views
3,881
Replies
19
Views
10,117

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top