← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rvb/maas/maas-fix-http-file into lp:maas

 

Raphaël Badin has proposed merging lp:~rvb/maas/maas-fix-http-file into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~rvb/maas/maas-fix-http-file/+merge/96324

This branch fixes the deployment apache config file:
- fix path to static resources
- protect the expire statement with IfModule mod_expires.c
- put the expire directive at the top level (/MaaS/ location) since the django app itself will soon serve javascript/css files (using convoy)
-- 
https://code.launchpad.net/~rvb/maas/maas-fix-http-file/+merge/96324
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-fix-http-file into lp:maas.
=== modified file 'contrib/maas-http.conf'
--- contrib/maas-http.conf	2012-03-05 16:58:40 +0000
+++ contrib/maas-http.conf	2012-03-07 11:11:19 +0000
@@ -1,11 +1,22 @@
 WSGIScriptAlias /MaaS  /usr/share/maas/wsgi.py
 
+<IfModule mod_expires.c>
+    <Location /MaaS>
+        ExpiresActive On
+        ExpiresByType text/javascript "access plus 1 years"
+        ExpiresByType application/javascript "access plus 1 years"
+        ExpiresByType application/x-javascript "access plus 1 years"
+        ExpiresByType text/css "access plus 1 years"
+        ExpiresByType image/gif "access plus 1 years"
+        ExpiresByType image/jpeg "access plus 1 years"
+        ExpiresByType image/png "access plus 1 years"
+    </Location>
+</IfModule>
+
 # Serve files from staticfiles.
-Alias /MaaS/static/ /var/lib/maas/static/
+Alias /MaaS/static/ /usr/share/maas/web/static/
 <Directory /usr/share/maas/web/static/>
     SetHandler None
-    ExpiresActive On
-    ExpiresDefault "access plus 365 days"
 </Directory>
 
 # This can be safely removed once Django 1.4 is used: admin media
@@ -13,6 +24,4 @@
 Alias /MaaS/static/admin/ /usr/share/pyshared/django/contrib/admin/media/
 <Directory /usr/share/pyshared/django/contrib/admin/media/>
     SetHandler None
-    ExpiresActive On
-    ExpiresDefault "access plus 365 days"
 </Directory>