[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ProgSoc] Cannot get access
James Wan spaeth thus:
> Also, if anyone can tell me how to override the  error page
> so i can stick my own error page instead..
> is the file called notauth.html i create and stick it in the directory
> where .htaccess resides ?
Yes an no. Have a look at the custom errordocs information on the
http://docs.apache.org web site, or have a look what i did in
http://www.progsoc.uts.edu.au/~cmewett/errordocs for my own custom
pages, and http://www.progsoc.uts.edu.au/~cmewett/.htaccess for how it
The no? It can't go in the same directory (If the web server is not
allowed to serve files in the directory based on incorrect
authentication, it can't give out an error document from that directory,
so it will cascade back to the default 401 page for the web server, or
possibly 500 (I think - I haven't checked how apache handles this). The
upshot is that it will have to go in a different directory, that doesn't
have access restrictions (suggestion: your public_html directory, or a
seperate directory off that).
As much as I can, I'd like to encourage anyone who has restricted files
in their html directories to create their own custom 401/403 pages, so
surfers don't hassle the www list when they can't see your pages.
gleNN! recently posted that restrictions probably can't be done per
file. This can not be done in htaccess files, so you will need to create
a different directory for each file/set of files you want restrictions
The htaccess skeleton posted mentions:
> > AuthGroupFile /dev/null
I'd just like to note that this is not required for the apache web
server (which is what we're running) - it is in any documentation due to
a bug/feature in the NCSA http daemon.
A note on the error numbers you get:
401 would mean that the .htaccess file is working, but the password is
wrong, or your password file
403 means that the directory you're trying to access has incorrect file
permissions set, the htaccess file has the permissions wrong (If apache
can't read the file, it errs on the precautionary side), or that the
account has been locked.
A note on security:
Your htpasswd file does not need to be in a web accessible directory, so
it can be shoved in your home directory, where prying eyes can't find
it, the htaccess file just has to be pointing in the right place.
Christopher Mewett | http://www.progsoc.uts.edu.au/~cmewett
UTS Progsoc Web Co-ordinator | firstname.lastname@example.org
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to email@example.com.
If you are having trouble, ask firstname.lastname@example.org for help.
This list is archived at <http://www.progsoc.uts.edu.au/lists/progsoc/>