|
Home > Technical Support > Web Support > Password Protection
Use these instructions to password protect directories on your website via special .htaccess files. Note that this
works only with sites hosted on DCANet's UNIX servers.
You must use this interface to create passwords for your .htpasswd files for
limiting access to pages and directories. (For more information on secure web pages and
.htpasswd files, see NCSA's
security tutorial.) The reason you must use this interface is that the
DCANet web servers run a different version of UNIX than the server that you use to upload or create your website files (shell.dca.net, ftp.dca.net, or universal.dca.net). This means that the web servers do not recognize passwords generated by other servers.
To create a password entry that you can use to add to your .htpasswd file, enter
the username and password in the form below and press the "Submit"
button. If you do not enter a password, a random password will
be automatically generated.
Enter the username and password:
|
Example::
| Location of .htpasswd file |
/home/joeuser/.htpasswd |
| Contents of .htpasswd file |
foouser:$1$eP$uCnhSHdCbteSgMCLn7Dcj.
jqpublic:$1$Z1$XghwFtqeIlj4tLLO9cRGP0 |
| Location of .htaccess file |
/home/joeuser/public_html/somedir/.htaccess |
| Contents of .htaccess file |
AuthUserFile /home/joeuser/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic
<Limit GET>
require user jqpublic
require user foouser
</Limit> |
Make sure the .htaccess & .htpasswd files are world-readable!
chmod a+r .htaccess
chmod a+r .htpasswd
|