httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Singh " <>
Subject [users@httpd] How to write .htpasswd in <Directory>
Date Wed, 01 Sep 2004 21:32:43 GMT
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>
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 &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)
&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;Limit GET POST&gt;<BR>
Require valid-user<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>
<A target="_blank" HREF=""><IMG

View raw message