This is a discussion on .htaccess problems within the Apache Web Server forums, part of the Web Server and Related Forums category; I have created a .htaccess file and created a .htpasswd file and the user to login. However when I click ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have created a .htaccess file and created a .htpasswd file and the
user to login. However when I click the link to test the access restriction is in place it goes straight to the page instead of bringing up the username and password request dialog. I have edited my httpd.conf file to "Allowoverride All" and double checked the paths in my .htaccess file. My .htaccess file is as follows: AuthUserFile /var/www/html/careerGrad/private AuthGroupFile /dev/null AuthName "CareerGrad Members Area" AuthType Basic <Limit GET POST> require valid-user </Limit> Can anybody suggest where I might be doing wrong? |
|
|||
|
Davide Bianchi wrote:
> On 2006-11-27, Mike Morley <nobody@nowhere.com> wrote: >> I have edited my httpd.conf file to "Allowoverride All" and double >> checked the paths in my .htaccess file. > > And did you also restarted apache after changing the httpd.conf file? > >> My .htaccess file is as follows: >> >> AuthUserFile /var/www/html/careerGrad/private > > I wouldn't put the user file in the www tree, put it somewhere else, > as long as Apache can read it. > > Davide > Yes I restarted apache. The server I am testing it on is only my test bed. The server I am going to put it on won't allow me access to anywhere other than my own home directory. The smeg heads won't even allow me SSH access :( |
|
|||
|
"Mike Morley" <nobody@nowhere.com> schreef in bericht news:OyDah.3267$J4.2304@newsfe7-win.ntli.net... >I have created a .htaccess file and created a .htpasswd file and the user >to login. However when I click the link to test the access restriction is >in place it goes straight to the page instead of bringing up the username >and password request dialog. > > I have edited my httpd.conf file to "Allowoverride All" and double checked > the paths in my .htaccess file. > > My .htaccess file is as follows: > > AuthUserFile /var/www/html/careerGrad/private > AuthGroupFile /dev/null > AuthName "CareerGrad Members Area" > AuthType Basic > > <Limit GET POST> > require valid-user > </Limit> > > Can anybody suggest where I might be doing wrong? Your browser may not even request the page ... and show the cached version -checj the access_log-. Further, if you have no group file, just skip this directive AuthGroupFile. Why do you limit the validation to GET and POST, it impies methods like PUT and DELETE are available to everyone ... HansH |
|
|||
|
Davide Bianchi wrote:
> On 2006-11-27, Mike Morley <nobody@nowhere.com> wrote: >> The server I am testing it on is only my test bed. The server I am going >> to put it on won't allow me access to anywhere other than my own home >> directory. > > And you don't have a directory inside your home directory that is outside > the 'www' tree? But anyway, if you restarted apache and don't get the > authentication, check the error_log and see if there are any clues. > Also, be sure you enabled .htaccess (something make me think that a > 'allowoverride none' is overriding your configuration). > > Davide > I am relatively new to web server configuration and don't want to knacker anything just yet as I don't have the time to mess around trying to fix it. I have emptied my cache so that shouldn't be a problem also nothing seems to be standing out in the error_log. |