I wish to disable the ~username method of vewing a website.

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » Apache Related Information

I wish to disable the ~username method of vewing a website.Last Modified: Dec 16, 2015, 12:53 am
CustomBuild 2.0 now has the option by default:

cd /usr/local/directadmin/custombuild
./build set userdir_access no
./build rewrite_confs

so if you need to access a domain before it resolves, add your domain and IP to your computer's "hosts" file to override the true dns.

old way

For whatever reason, if you wish to not allow the 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.
As well, any call to:

UserDir public_html

needs to be changed to

UserDir disabled

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 and the "ScriptAliasMatch" line.
Change the UserDir to be disabled.

2) Type:

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

3) Edit:


and again, remove the AliasMatch line and set "UserDir disabled".

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST