aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/status/templates/apache_staging.conf
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/status/templates/apache_staging.conf')
-rw-r--r--ansible/roles/status/templates/apache_staging.conf47
1 files changed, 47 insertions, 0 deletions
diff --git a/ansible/roles/status/templates/apache_staging.conf b/ansible/roles/status/templates/apache_staging.conf
new file mode 100644
index 0000000..68e1995
--- /dev/null
+++ b/ansible/roles/status/templates/apache_staging.conf
@@ -0,0 +1,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>