aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Duraffort <remi.duraffort@linaro.org>2020-02-26 17:00:05 +0100
committerRémi Duraffort <remi.duraffort@linaro.org>2020-02-26 17:00:05 +0100
commit8c077d7a643203d7b35c368954ecf978efe46253 (patch)
tree5fe74b8f1fd1ec057e7bcdab7f5e1bcf8064a7bc
parent0f64e4255173ec66ba61d157c296489293ca3d35 (diff)
Forward static handling to lava-server-gunicorn
Signed-off-by: Rémi Duraffort <remi.duraffort@linaro.org>
-rw-r--r--overlays/lava-server/etc/apache2/sites-available/lava-server.conf44
1 files changed, 4 insertions, 40 deletions
diff --git a/overlays/lava-server/etc/apache2/sites-available/lava-server.conf b/overlays/lava-server/etc/apache2/sites-available/lava-server.conf
index 37f03fb..e687e01 100644
--- a/overlays/lava-server/etc/apache2/sites-available/lava-server.conf
+++ b/overlays/lava-server/etc/apache2/sites-available/lava-server.conf
@@ -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