summaryrefslogtreecommitdiffstats
path: root/roles/httpd/templates/vhost_redirect.conf
blob: 1c93343c0ecab627790c94ba2e522d6b76ff14a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<VirtualHost *:80>
        {% if website_password is defined %}
        <Location />

            AuthType Basic
            AuthName "Restricted access, contact OSAS for password"
            AuthUserFile /etc/httpd/{{ website_url }}.htpasswd
            Require valid-user
        </Location>
        {% endif %}

        ServerName {{ website_url }}
        Redirect / {{ redirect }}
</VirtualHost>