httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Simpson <>
Subject [users@httpd] password protect files
Date Thu, 07 Oct 2004 13:40:57 GMT

I'm using Apache 2 and can password protect a directory with no problem.
However, I need to password protect just 1 file within a directory, not the
whole directory.

I've searched the web and Apache's website but found nothing re: just files
(only directories).

I do the authentification from within the conf file (not a seperate
.htaccess file).

Can someone tell me what's the obvious error below:

Alias /library "C:/xxx/yyy/zzz/admin.html"

  <Files "C:/xxx/yyy/zzz/admin.html">
        AuthType Basic
	AuthUserFile "C:/Apache2/<dir>/<filename>"
	Require user <user>

The following works for protecting a directory:

Alias /library "C:/xxx/yyy/zzz"

  <Directory "C:/xxx/yyy/zzz">
        AuthType Basic
	AuthUserFile "C:/Apache2/<dir>/<filename>"
	Require user <user>

Thanks in advance.

Michael Simpson
Systems Development
Express Newspapers
020-7922-7225 (w)
020-7922-7799 (f)

The NMA: Opening Up Newspapers

Visit Express Newspapers and OK Magazine online picture archive at


Any views or opinions are solely those of the author 
and do not necessarily represent those of Express Newspapers
The information transmitted is intended only for the person 
or entity to which it is addressed and may contain confidential 
and/or privileged material.If you are not the intended recipient
of this message please do not read ,copy, use or disclose this 
communication and notify the sender immediately. It should be 
noted that any review, retransmission, dissemination or other 
use of, or taking action in reliance upon, this information by 
persons or entities other than the intended recipient is prohibited.
Email communications may be monitored


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message