Preventing user from using the server IP to access their website

max2000

Verified User
Joined
Nov 7, 2004
Messages
141
Location
Europe
Hello,

I would like to provent users from accessing their website using the server IP:

http://1.2.3.4/~username

I would like to stop this.

Many people profit from this possibility to link to illegal material or pishing pages without having to buy a domain name somewhere.

Thank you for your hints.
 
in your httpd.conf

there should be 2 lines in the virtual hosts near the end:

AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2

comment it, or modify to whatever your want

remember to restart Apache after the change
 
Back
Top