Restrict access to apache2 web root but allow it to subfolders
        Posted  
        
            by 
                razor7
            
        on Ask Ubuntu
        
        See other posts from Ask Ubuntu
        
            or by razor7
        
        
        
        Published on 2012-03-29T23:11:27Z
        Indexed on 
            2012/03/30
            23:42 UTC
        
        
        Read the original article
        Hit count: 315
        
configuration
I need to restrict access by password to my web root apache test server (ie http://localhost) but allow access to subfolders (ie: http://localhost/testsite)
I did create the .htpasswd and .htaccess, and put the .htaccess to web root (http://localhost) so when trying to access web root, it asks for user and pass, but so does in subfolders (ie: trying to access http://localhost/testite)
I want to be asked for password on web root, but not on subfolders.
Is that possible?
© Ask Ubuntu or respective owner