Find the answer to your Linux question:
Results 1 to 3 of 3
I'm password protecting a wordpress's admin directory on my Linux box with: Code: <Directory "/path/wwwwebsitecom/wp-admin"> AllowOverride None AuthType Basic AuthName "Blog Maintenance" AuthUserFile /path/passwd.conf <Limit GET PUT POST DELETE> require ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    9

    Apache Password Protect Exclusions?


    I'm password protecting a wordpress's admin directory on my Linux box with:
    Code:
       <Directory "/path/wwwwebsitecom/wp-admin">
          AllowOverride None
          AuthType Basic
          AuthName "Blog Maintenance"
          AuthUserFile /path/passwd.conf
    
          <Limit GET PUT POST DELETE>
             require user someuser
          </Limit>
       </Directory>
    I would like to exclude a few files under wp-admin from this password requirement. Can anyone tell me how to do it? I'm lost. I'm running Apache 1.3.34 still.

    Thanks.
    Last edited by atreyu; 05-12-2013 at 04:04 AM. Reason: added CODE tags to aid in readability

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    hello and welcome!

    you can password-protect specific files like this:

    Code:
    AuthUserFile /etc/httpd/.htpasswd
    AuthName "secret place"
    AuthType Basic
    
    <Limit GET POST>
    Options +ExecCGI
    AddHandler cgi-script cgi pl
    DirectoryIndex index.html
    </Limit>
    
    <Files "file2">
      require user someuser
    </Files>
    so i would either list all my password-protected files like "file2" above, or i'd just put them in another dir, and password protect that dir and leave the other one open.

  3. #3
    Just Joined!
    Join Date
    Apr 2012
    Posts
    9
    This is too unrealistic with all the wp-admin files. I was hoping to password protect * like I have done in my example, but then have like a list of files negated.

    <Files "/path/wwwwebsitecom/wp-admin/file2">
    Allow from all
    </Files>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •