Posted by: Master Will | December 29, 2012

How to disable the ~username method of vewing a website

For whatever reason, if you wish to not allow the http://1.2.3.4/~username method of viewing a website, you can do so by removing the lines:

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

from the apache VirtualHosts, by editing the templates.

1) Type:

cd /usr/local/directadmin/data/templates/custom
cp ../ips_virtual_host.conf .

Edit the copied ips_virtual_host.conf file and remove the AliasMatch line.  Also remove the “ScriptAliasMatch” line.

2) Type:

echo “action=rewrite&value=ips” >> /usr/local/directadmin/data/task.queue

3) Edit:

/etc/httpd/conf/extra/httpd-vhosts.conf

and again, remove the AliasMatch line.

 

Source: http://help.directadmin.com/item.php?id=344

Advertisements

Categories