KevinReichard
07-17-2002, 02:57 PM
These talkbacks are in response to the article Using .htaccess Files with Apache (http://www.serverwatch.com/stypes/servers/article.php/1127711).
Xu writes:
I had just made a htaccess file in certain directory. But that would change anything at all. In the browser, I still can view restricted web page (in that directory) without being asked passwd and username. I had read through you Using .htaccess Files with Apache. But I can not get a clue. The thing is that I need to restart the web server then the htaccess can take effect ? I had tried but unsucessful. In httpd.conf, the AccessFileFileName .htaccess. So everything look fine. Is that I need to run httpd command ? But unfortunately that's not case. That doesn't work.I can list my .htaccess file : AuthName "restricted stuff" AuthType Basic AuthUserFile /home/users require valid-user . Can you tell me what go wrong ? By the way, is that htaccess file need something to take effect ? For example, run some command. I use htpasswd to edit username and password. I mean how Apache server read directives in htaccess file. Need I run some command to push Apache to recognized it ?Many thanks.
KE Pie-Chih, Colin writes:
You should set the following insides the "httpd.conf" and restart the deamon.
AllowOverride All
Jeff Fohl writes:
Hi Xu -
I think your problem might be that you need to edit your httpd.conf file. Make sure that you have enabled .htaccess files to have the ability to use AuthConfig. This is one way of writing it in your httpd.conf file:
####################
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
####################
Xu writes:
I had just made a htaccess file in certain directory. But that would change anything at all. In the browser, I still can view restricted web page (in that directory) without being asked passwd and username. I had read through you Using .htaccess Files with Apache. But I can not get a clue. The thing is that I need to restart the web server then the htaccess can take effect ? I had tried but unsucessful. In httpd.conf, the AccessFileFileName .htaccess. So everything look fine. Is that I need to run httpd command ? But unfortunately that's not case. That doesn't work.I can list my .htaccess file : AuthName "restricted stuff" AuthType Basic AuthUserFile /home/users require valid-user . Can you tell me what go wrong ? By the way, is that htaccess file need something to take effect ? For example, run some command. I use htpasswd to edit username and password. I mean how Apache server read directives in htaccess file. Need I run some command to push Apache to recognized it ?Many thanks.
KE Pie-Chih, Colin writes:
You should set the following insides the "httpd.conf" and restart the deamon.
AllowOverride All
Jeff Fohl writes:
Hi Xu -
I think your problem might be that you need to edit your httpd.conf file. Make sure that you have enabled .htaccess files to have the ability to use AuthConfig. This is one way of writing it in your httpd.conf file:
####################
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
####################