lpantos Posted February 5, 2007 Share Posted February 5, 2007 HI. I have installed WAMP on my windows 2000 server. At this point, I have started apache and stopped IIs; I need to password protect the website and don't know how to do that with apache. Thanks. Quote Link to comment Share on other sites More sharing options...
the_oliver Posted February 5, 2007 Share Posted February 5, 2007 Best thing to do would be using .htaccess You can insist on that in the .conf file. The folowing is from a Linux httpd.conf but i imagen very similer. (posibly identical!) <Directory "[i]thedocumentroot[/i]"> Options None AllowOverride None Order allow,deny Allow from all AuthName "PageName Access" AuthType Basic AuthUserFile [i]fileparth[/i]/htpasswd.users Require valid-user </Directory> I did a google on '.htaccess on windows' and got loads! Quote Link to comment Share on other sites More sharing options...
andrewholway Posted February 6, 2007 Share Posted February 6, 2007 According to the apache manual your not supposed to be using .htaccess for security if you have root access.(unless you just want to password a single directory). Im not saying it doesnt work, cos it does, rather well. Just seen it written a few times thats its not the done thing. Using .htaccess would be more for users who dont have root access who, for instance want to password protect there family photos that they hold on a more public server....... Trying to find in the manual where I found this. as far as I understand (and Im still rather sketchy on this beleive me) Apache has a general configuration file apache2.conf You can specify any of the 30 or so directives in there and that will be your global settings. (password protect thingy in here and the entire site is locked) Each virtual server has its own configuration file where you can again specify any of these directives, these will over ride the specifications in the apache2.conf. (in here and one of you domains would be locked. I have two. one of which is locked) You can then specify directives in your .htaccess file. This is for individual "per directory" settings(family photos). This is as far as I understand and its probable that Im really bloody wrong! Please let me know chaps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.