# 
# This configuration file enables the default "Welcome" page if there
# is no default index page present for the root URL.  To disable the
# Welcome page, comment out all the lines below. 
#
# NOTE: if this file is removed, it will be restored on upgrades.
#
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /.noindex.html
</LocationMatch>

<Directory /usr/share/httpd/noindex>
    AllowOverride None
    Require all granted
</Directory>

<Directory /etc/nethserver>
    AllowOverride None
    Require all granted
</Directory>

{
    my $httpd = $DB->get('httpd') or return;
    my $home = $httpd->prop('HomePage') || '';

    if ($home eq '') {
        $home = 'nethserver';
    }
    $OUT .= "Alias /.noindex.html /usr/share/httpd/noindex/${home}/index.html\n";
    $OUT .= "Alias /res_${home} /usr/share/httpd/noindex/${home}/res";
}

Alias /noindex/css/bootstrap.min.css /usr/share/httpd/noindex/css/bootstrap.min.css
Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
Alias /noindex/css/fonts/ /usr/share/httpd/noindex/css/fonts/
Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png
