Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Posts
    1,349

    .htaccess wont' work

    My head is splitting over this thing. I've installed Subversion in my system and it works fine. However I want to password-protect the /repos/ directory so that random users can't just open their browser to mysite.com/repos/ and view all of my repository files.

    I tried password-protecting the "repos" directory, but no matter how hard I try it doesn't work. I think it has to do with it being a "Location" rather than a "Directory". Can someone help me fix this so that a .htaccess authentication file within the /repos/ folder will work?

    Code:
    <virtualhost 192.168.1.110:443>
        ServerAdmin [email protected]
        DocumentRoot /www/repos/htdocs
        ServerName repos.bj.myserver.com
        ErrorLog logs/svn-error_log
        CustomLog logs/svn-access_log combined
            <Location /repos>
            DAV svn
             SVNParentPath /www/subversion
    
                #Limit write permission to list of valid users.
               <LimitExcept GET PROPFIND OPTIONS REPORT>
                  #Require SSL connection for password protection.   
                  SSLRequireSSL       
    
                  AuthType Basic
                  AuthName "Authorization Realm"
                  AuthUserFile /www/auth/.passwd
                  Require valid-user
               </LimitExcept>
            </Location>
    
    SSLEngine on                  
    SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    
    </virtualhost>        
    
    
    <Directory />
        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    </Directory>

  2. #2
    Join Date
    Dec 2001
    Location
    NYC, NY
    Posts
    798
    add the same <directory> statement inside the <virtualhost> entry restart apache and it should work
    Blog your life away
    http://photoblog.com

  3. #3
    Join Date
    May 2001
    Posts
    1,349
    I did that too and still it didn't work. Any other ideas?

Posting Permissions

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