httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <jg6...@cox.net>
Subject Re: [users@httpd] Protecting a Directory
Date Fri, 03 Oct 2008 20:44:12 GMT
In the folder xxxx is an htaccess with the following:

AuthName "Restricted Area"
AuthType Basic
AuthUserFile xampp/htdocs/xxxx/.htpasswd
AuthName "My Private Area"
require valid-user

In the config is the following:

Alias /xxxx "D:/"
<Directory "D:/">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride AuthConfig
    Order deny,allow
    Allow from All

</Directory>

My thinking is that the htaccess needs a different path since the directory 
is using an alias?

----- Original Message ----- 
From: "Justin Pasher" <justinp@newmediagateway.com>
To: <users@httpd.apache.org>
Sent: Friday, October 03, 2008 1:32 PM
Subject: Re: [users@httpd] Protecting a Directory


> jg6789@cox.net wrote:
>> I have a .htaccess and .htpasswd in a direcotry folder and i keep getting 
>> this message no matter how i configure the htaccess file and htpasswd 
>> files.
>>
>> Server Error!
>> The server encountered an internal error and was unable to complete your 
>> request. Either the server is overloaded or there was an error in a CGI 
>> script.
>>
>
> The apache error log should have a little more information on why it is 
> returning (presumably) a 500 error code. Perhaps the server is not 
> configured to allow some other directives specified in the .htaccess file 
> (such as the Options directive)?
>
> --
> Justin Pasher
>
>
>> ----- Original Message ----- From: "Justin Pasher" 
>> <justinp@newmediagateway.com>
>> To: <users@httpd.apache.org>
>> Sent: Friday, October 03, 2008 12:08 PM
>> Subject: Re: [users@httpd] Protecting a Directory
>>> jg6789@cox.net wrote:
>>>> There still seems to be alot of discrepancy on this issue. Whether or 
>>>> not to use a .htaccess or directive command to protect a directory so 
>>>> I'm looking for some answers on what works the best usually.
>>>>  Protecting a folder called xxxx
>>>>  Alias /xxx "D:/"
>>>> <Directory "D:/">
>>>>     Options FollowSymLinks
>>>>     AllowOverride None
>>>>     Order deny,allow
>>>>     Deny from all
>>>> </Directory>
>>>>  use .htaccess or how can I use the above directive to only allow a 
>>>> specific user in?
>>>
>>> The directives can be put in either place (apache config or .htaccess 
>>> file). However, <Directory> cannot be used inside an .htaccess file, so

>>> you'll have to put the .htaccess file in the directory you wish to 
>>> protect.
>>>
>>> I assume you want the user to be prompted for a username/password when 
>>> they visit the directory? Basic HTTP authentication will accomplish that 
>>> for you.
>>>
>>> http://httpd.apache.org/docs/2.2/howto/auth.html
>>>
>>> -- 
>>> Justin Pasher
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message