...
Here is a simplified configuration of my setup. If you require more detail please look at my full article on Creating Online Shares.
Code Block |
---|
|
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.krypton.com
ServerAlias www.krypton.com
DocumentRoot /home/www.krypton.com/www
# This restrictive a precedence for ALL directory blocks.
<Directory />
Options FollowSymLinks
# This prevents use of .htaccess
AllowOverride None
</Directory>
# Main location of static content for the websites.
<Directory /home/www.krypton.com/www/>
Options +MultiViews
Order Allow,Deny
Allow from all
</Directory>
Alias /shared.private "/home/www.krypton.com/shared.private"
<Directory /home/www.krypton.com/shared.private>
# Allow website admin to use .htaccess - http://httpd.apache.org/docs/2.2/mod/core.html,
# AuthConfig - Authentication
# Indexes - Makes directory browseable
# Specifically Indexes does NOT work and may be a bug with Ubuntu or Apache. Need to investigate further.
AllowOverride AuthConfig Indexes
# This DOES allow Indexes to work but I want things to be more secure.
#AllowOverride All
</Directory>
ErrorLog /var/log/apache2/www.krypton.com.error.log
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel debug
CustomLog /var/log/apache2/www.krypton.com.access.log combined
</VirtualHost> |
Here are the contents of /home/www.krypton.com/shared.private/.htaccess,
Code Block |
---|
|
# Enables directory listing BUT does not appear to work with AllowOverride Indexes
Options +Indexes
# Enable authentication, see http://httpd.apache.org/docs/2.0/howto/auth.html
AuthType Basic
AuthName "Password Required"
AuthUserFile /home/www.tin.homeip.net/keys/tinpham-www.tin.homeip.net.shared.private
Require valid-user |
...
I also used a simplified use case where the httpd.conf only contains,
Code Block |
---|
|
AllowOverride AuthConfig Indexes |
and the .htaccess only contains,
Code Block |
---|
|
Options +Indexes |
And the result is the same error.