# Canonical host
<VirtualHost *:80>
    ServerName  files.leloop.org
    ServerAdmin webmaster@leloop.org

    Options +FollowSymLinks

    DocumentRoot /var/www/files.leloop.org/
    <Directory   /var/www/files.leloop.org/>
        # Acceptable overrides:
        # - FileInfo (.htacces-based rewrite rules)
        # - AuthConfig (.htaccess-based basic auth)
        AllowOverride   FileInfo AuthConfig Indexes
        IndexOptions    DescriptionWidth=* \
                        NameWidth=* \
                        FancyIndexing \
                        IconsAreLinks \
                        IgnoreCase \
                        VersionSort \
                        XHTML
    </Directory>

#    # Map some private area and have some mandatory auth
#    Alias /private /var/www/files.leloop.org/private
#    <Location /private>
#        AuthName     "Private Area"
#        AuthType     Basic
#
#        # Plain user/password
#        AuthUserFile /var/www/files.leloop.org/private/.htpasswd
#        require valid-user
#
#        # Adress-based
#        Order Deny,Allow
#        Deny from all
#        Allow from 12.21.34.67
#        Allow from 33.44.55.0/24
#        Allow from 66.77.99.96/255.255.255.224
#        Allow from home.myname.com
#        Allow from .trustee.com
#
#        # The following means that "valid-user" OR "allowed <ip>" is okay
#        Satisfy any
#    </Location>

    # LOGS
    # loopback: cf /etc/apache2/httpd.conf
    ErrorLog  /var/log/apache2/files.leloop.org/error.log
    CustomLog /var/log/apache2/files.leloop.org/access.log combined env=!loopback

# rewrite.log
# bug 46942 - error log messages: apr_global_mutex_lock(rewrite_log_lock) failed  
#             cf https://issues.apache.org/bugzilla/show_bug.cgi?id=46942
#    RewriteLog /var/log/apache2/files.leloop.org/rewrite.log
#    RewriteLogLevel 0

</VirtualHost>


# Canonical host
<VirtualHost *:443>
    ServerName  files.leloop.org
    ServerAdmin webmaster@leloop.org

    SSLEngine on
    SSLCertificateFile /etc/ssl/private/leloop.crt
    SSLCertificateKeyFile /etc/ssl/private/leloop.key
    SSLCertificateChainFile /etc/ssl/private/cacert.crt

    Options +FollowSymLinks

    DocumentRoot /var/www/files.leloop.org/
    <Directory   /var/www/files.leloop.org/>
        # Acceptable overrides:
        # - FileInfo (.htacces-based rewrite rules)
        # - AuthConfig (.htaccess-based basic auth)
        AllowOverride   FileInfo AuthConfig Indexes
        IndexOptions    DescriptionWidth=* \
                        NameWidth=* \
                        FancyIndexing \
                        IconsAreLinks \
                        IgnoreCase \
                        VersionSort \
                        XHTML
    </Directory>

#    # Map some private area and have some mandatory auth
#    Alias /private /var/www/files.leloop.org/private
#    <Location /private>
#        AuthName     "Private Area"
#        AuthType     Basic
#
#        # Plain user/password
#        AuthUserFile /var/www/files.leloop.org/private/.htpasswd
#        require valid-user
#
#        # Adress-based
#        Order Deny,Allow
#        Deny from all
#        Allow from 12.21.34.67
#        Allow from 33.44.55.0/24
#        Allow from 66.77.99.96/255.255.255.224
#        Allow from home.myname.com
#        Allow from .trustee.com
#
#        # The following means that "valid-user" OR "allowed <ip>" is okay
#        Satisfy any
#    </Location>

    # LOGS
    # loopback: cf /etc/apache2/httpd.conf
    ErrorLog  /var/log/apache2/files.leloop.org/error.log
    CustomLog /var/log/apache2/files.leloop.org/access.log combined env=!loopback

# rewrite.log
# bug 46942 - error log messages: apr_global_mutex_lock(rewrite_log_lock) failed  
#             cf https://issues.apache.org/bugzilla/show_bug.cgi?id=46942
#    RewriteLog /var/log/apache2/files.leloop.org/rewrite.log
#    RewriteLogLevel 0

</VirtualHost>

# vim: set ft=apache :
