aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/status/templates/apache_staging.conf
blob: 68e1995aac873a553ba7b37be377906005f3a32f (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
45
46
47
<VirtualHost *:80>
    ServerName {{ install_dir }}
    ServerAdmin webmaster@linaro.org

    CustomLog ${APACHE_LOG_DIR}/{{ install_dir }}-access.log combined
    ErrorLog ${APACHE_LOG_DIR}/{{ install_dir }}-error.log

    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
    #DocumentRoot /var/www/{{ install_dir }}

    WSGIDaemonProcess {{ install_dir }} maximum-requests=10000
    WSGIProcessGroup {{ install_dir }}
    WSGIScriptAlias / {{ install_base }}/{{ install_dir }}/{{ install_dir }}.wsgi

    ExpiresActive   On
    ExpiresDefault  "access plus 300 seconds"

    ExpiresByType   text/css        "access plus 1 month"
    ExpiresByType   text/javascript "access plus 1 month"
    ExpiresByType   image/png       "access plus 1 month"
    ExpiresByType   image/jpg       "access plus 1 month"
    ExpiresByType   image/jpeg      "access plus 1 month"
    ExpiresByType   image/x-icon    "access plus 1 month"

    Header append Cache-Control "public, no-transform"

    <FilesMatch "\.(html|htm)$">
        Header add Cache-Control "must-revalidate"
    </FilesMatch>

    <FilesMatch "\.(js|css)$">
        Header add Cache-Control "max-age=604800"
    </FilesMatch>

    Alias /static/ /var/www/{{ install_dir }}/static/
    <Location "/static/">
        Options -Indexes
        SetOutputFilter DEFLATE

        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

        SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
        Header append Vary User-Agent env=!dont-vary
    </Location>
</VirtualHost>