logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: password protect directory
Author
puertoblack2003



Joined: 31 Jul 2009
Posts: 121
Location: U.S

PostPosted: Mon 10 Mar '14 3:15    Post subject: password protect directory Reply with quote

Can someone share the proper way. to password protect a directory for apache 2.4.7. Information i gather seems to not work.

Thanks in advance
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 10 Mar '14 4:07    Post subject: Reply with quote

how about you tell us what you have tried .. so someone can point you in the right direction and maybe explain where you are going wrong
Back to top
puertoblack2003



Joined: 31 Jul 2009
Posts: 121
Location: U.S

PostPosted: Mon 10 Mar '14 4:31    Post subject: Reply with quote

glsmith wrote:
how about you tell us what you have tried .. so someone can point you in the right direction and maybe explain where you are going wrong


sorry about that do make since Sad

ok in my vhost file i have this.

Code:
<Directory "F:/Abyss Web Server/private">
    Options FollowSymLinks Multiviews Indexes
    AllowOverride None
    AuthType basic
    AuthName "private"
    AuthUserFile "F:/Abyss Web Server/private/.htpasswd"
    Require valid-user
</Directory>
<Directory "F:/Abyss Web Server/private">
Require all denied
</Directory>


In my file directory that i want password protected there's a htaccess with this info

Code:
AuthType Basic
AuthName "Authentication Required"
# Optional line:
AuthBasicProvider file
AuthUserFile "F:/Abyss Web Server/private/.htpasswd"
AuthGroupFile "F:/Abyss Web Server/private/.htgroup"
Require group admins


And with that it still dont work when i go to the directory via browser the pop up box to enter username and pass
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 10 Mar '14 4:40    Post subject: Reply with quote

AllowOverride must set to AuthConfig not none and it needs to be set that way in httpd.conf for the <Directory> you are going to password protect.
Back to top
puertoblack2003



Joined: 31 Jul 2009
Posts: 121
Location: U.S

PostPosted: Mon 10 Mar '14 5:15    Post subject: Reply with quote

glsmith wrote:
AllowOverride must set to AuthConfig not none and it needs to be set that way in httpd.conf for the <Directory> you are going to password protect.


ok thank you. It's seem to work but, not what i expected.

for my forum if i click on the admin link here http://www.mysite.org/myadminpanel/index.php the pop up login window wont appear if i remove this to folder then it will

http://www.mysite.org/myadminpanel/

I tried to convert everything over coming from 2.2.26 this part is my last obstacles.

thank you for your help
Back to top


Reply to topic   Topic: password protect directory View previous topic :: View next topic
Post new topic   Forum Index -> Apache