summaryrefslogtreecommitdiff
path: root/wordpress/wordpress-site.conf.ctpl
blob: d47ce988e2892382028384003c1b420e2e6d895f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<MDomain {SITE_NAME}>
        MDContactEmail webmaster@{SITE_NAME}
        MDCertificateAgreement accepted{for subdomain in subdomains}
	MDMember {subdomain}.{SITE_NAME}
{end}</MDomain>
<VirtualHost *:80>
        ServerName {SITE_NAME}{for subdomain in subdomains}
        ServerAlias {subdomain}.{SITE_NAME}{end}
        Redirect / https://{SITE_NAME}
</VirtualHost>

<VirtualHost *:443>
        ServerName {SITE_NAME}{for subdomain in subdomains}
        ServerAlias {subdomain}.{SITE_NAME}{end}

        ServerAdmin webmaster@{SITE_NAME}
        SSLEngine on

        ErrorLog /srv/{SITE_NAME}/logs/error.log
        CustomLog /srv/{SITE_NAME}/logs/access.log combined

        <Location "/server-status">
                SetHandler server-status
        </Location>

        DocumentRoot /srv/{SITE_NAME}/public_html/
        <Directory /srv/{SITE_NAME}/public_html>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                <IfModule mod_rewrite.c>
                        RewriteEngine On
                        RewriteRule ^wordpress/ - [L]
                        RewriteCond %\{REQUEST_FILENAME\} !-f
                        RewriteCond %\{REQUEST_FILENAME\} !-d
                        RewriteRule . /wordpress/index.php [L]
                        RewriteRule ^$ /wordpress/index.php [L]
                </IfModule>
                Require all granted
        </Directory>

        ScriptAlias /git "/usr/lib/cgit/cgit.cgi/"
        Alias /cgit-css "/usr/share/cgit/"

</VirtualHost>