httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Singh " <apachem...@rediffmail.com>
Subject [users@httpd] How to write .htpasswd in <Directory>
Date Wed, 01 Sep 2004 21:32:43 GMT
<P>
Hi friends...<BR>
I am trying to secure my application directory in Apache. I made a .htpasswd file under /home/user/apache2/
using the command<BR>
htpasswd -c .htpasswd username. My query is how to implement this thing? My config file looks
something like this :<BR>
<BR>
------snip-----<BR>
DocumentRoot &quot;/var/www/html/apps&quot; #apps is the directory where application
is placed.<BR>
&lt;Directory /&gt;<BR>
&nbsp; &nbsp; Options Indexes FollowSymLinks<BR>
&nbsp; &nbsp; AllowOverride None<BR>
&nbsp; &nbsp; Order Deny,Allow<BR>
&nbsp; &nbsp; Deny from all<BR>
&lt;/Directory&gt;<BR>
&lt;Directory &quot;/var/www/html&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp;Options Indexes FollowSymLinks<BR>
&nbsp; &nbsp; &nbsp;Order allow,deny<BR>
&nbsp; &nbsp; &nbsp;Deny from all<BR>
&nbsp; &nbsp; &nbsp; &nbsp; #Allow from x.x.x.x (terminal address in LAN)
<BR>
&nbsp; &nbsp; &nbsp;AuthType Basic<BR>
&nbsp; &nbsp; &nbsp;AuthUserFile /home/user/apache2/.htpasswd<BR>
&nbsp; &nbsp; &nbsp;AuthName &quot;Authentication Please&quot;<BR>
&nbsp; &nbsp; &nbsp;Require valid-user<BR>
&nbsp; &nbsp; &nbsp;Satisfy any<BR>
&nbsp; &nbsp; &nbsp;#AllowOverride All<BR>
&nbsp; &nbsp; &nbsp;AllowOverride AuthConfig<BR>
&lt;/Directory&gt;<BR>
&lt;Limit GET POST&gt;<BR>
Require valid-user<BR>
&lt;/Limit&gt;<BR>
&lt;Directory &quot;/var/www/html/apps&quot;&gt;<BR>
&nbsp; &nbsp; &nbsp; &nbsp; AllowOverride All<BR>
&nbsp; &nbsp; &nbsp; &nbsp; Options Indexes FollowSymLinks<BR>
&nbsp; &nbsp; &nbsp; &nbsp; Order allow,deny<BR>
&nbsp; &nbsp; &nbsp; &nbsp; Allow from all<BR>
&lt;/Directory&gt;<BR>
<BR>
Regards
</P>
<br><br>
<A target="_blank" HREF="http://clients.rediff.com/signature/track_sig.asp"><IMG
SRC="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom"
BORDER=0 VSPACE=0 HSPACE=0></a>

Mime
View raw message