Commit 8c077d7a authored by Rémi Duraffort's avatar Rémi Duraffort

Forward static handling to lava-server-gunicorn

Signed-off-by: Rémi Duraffort's avatarRémi Duraffort <remi.duraffort@linaro.org>
parent 0f64e425
......@@ -3,60 +3,24 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Alias /static/ /usr/share/lava-server/static/
Alias /tmp/ /var/lib/lava/dispatcher/tmp/
Alias /favicon.ico /usr/share/lava-server/static/lava_server/images/logo.png
# Let apache2 handle these URIs
ProxyPass /static !
ProxyPass /tmp !
ProxyPass /favicon.ico !
# Send request to Gunicorn
ProxyPass / http://lava-server:8000/
ProxyPassReverse / http://lava-server:8000/
ProxyPreserveHost On
<IfModule mod_headers.c>
AddType application/x-font-woff .woff
AddType application/x-font-woff2 .woff2
ExpiresActive On
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType application/x-font-woff2 "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
Header unset ETag
FileETag none
</IfModule>
# Allow serving media, static and other custom files
<Directory /usr/share/lava-server/static/lava_server/>
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
DocumentRoot /usr/share/lava-server/static/lava_server/
# Make exceptions for static and media.
# This allows apache to serve those and offload the application server
<Location /static>
SetHandler none
</Location>
# images folder for lava-dispatcher tarballs
<Location /images/>
SetHandler none
</Location>
<Directory /var/lib/lava/dispatcher/tmp>
Options Indexes
Options -Indexes
Require all granted
AllowOverride None
</Directory>
<Directory /usr/share/lava-server/static>
Require all granted
<IfModule mod_php7.c>
php_admin_flag engine Off
</IfModule>
</Directory>
LogLevel info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment