Merge lp:~free.ekanayaka/landscape-charm/offline-assets-charm into lp:~landscape/landscape-charm/trunk

Proposed by Free Ekanayaka
Status: Merged
Approved by: Free Ekanayaka
Approved revision: 217
Merged at revision: 216
Proposed branch: lp:~free.ekanayaka/landscape-charm/offline-assets-charm
Merge into: lp:~landscape/landscape-charm/trunk
Diff against target: 51 lines (+8/-3)
3 files modified
config/vhostssl.tmpl (+1/-0)
hooks/conf/landscape-http (+6/-2)
hooks/hooks.py (+1/-1)
To merge this branch: bzr merge lp:~free.ekanayaka/landscape-charm/offline-assets-charm
Reviewer Review Type Date Requested Status
Geoff Teale (community) Approve
Alberto Donato (community) Approve
Review via email: mp+246107@code.launchpad.net

Commit message

Change configuration code to point apache and haproxy to the new
offline pages locations introduced in:

https://code.launchpad.net/~free.ekanayaka/landscape/offline-assets/+merge/245889

Description of the change

Change configuration code to point apache and haproxy to the new
offline pages locations introduced in:

https://code.launchpad.net/~free.ekanayaka/landscape/offline-assets/+merge/245889

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) wrote :

Looks good, +1

review: Approve
Revision history for this message
Geoff Teale (tealeg) wrote :

+1

review: Approve
217. By Free Ekanayaka

Fix offline rewrite rule

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config/vhostssl.tmpl'
--- config/vhostssl.tmpl 2014-10-17 13:50:31 +0000
+++ config/vhostssl.tmpl 2015-01-12 15:08:26 +0000
@@ -49,6 +49,7 @@
49 RewriteRule ^/attachment/(.*) http://{{ haproxy_msgserver }}/attachment/$1 [P,L]49 RewriteRule ^/attachment/(.*) http://{{ haproxy_msgserver }}/attachment/$1 [P,L]
50 RewriteRule ^/upload/(.*) http://{{ haproxy_packageupload }}/$1 [P,L]50 RewriteRule ^/upload/(.*) http://{{ haproxy_packageupload }}/$1 [P,L]
51 RewriteRule ^/(static.*) http://{{ haproxy_static }}/$1 [P,L]51 RewriteRule ^/(static.*) http://{{ haproxy_static }}/$1 [P,L]
52 RewriteRule ^/(offline.*) http://{{ haproxy_static }}/$1 [P,L]
52 RewriteRule ^/(config.*) http://{{ haproxy_static }}/$1 [P,L]53 RewriteRule ^/(config.*) http://{{ haproxy_static }}/$1 [P,L]
53 RewriteRule ^/(hash-id-databases.*) http://{{ haproxy_static }}/$1 [P,L]54 RewriteRule ^/(hash-id-databases.*) http://{{ haproxy_static }}/$1 [P,L]
54 RewriteRule ^/(repository.*) http://{{ haproxy_static }}/$1 [P,L]55 RewriteRule ^/(repository.*) http://{{ haproxy_static }}/$1 [P,L]
5556
=== modified file 'hooks/conf/landscape-http'
--- hooks/conf/landscape-http 2014-05-23 17:53:45 +0000
+++ hooks/conf/landscape-http 2015-01-12 15:08:26 +0000
@@ -15,11 +15,12 @@
15 Allow from all15 Allow from all
16 Require all granted16 Require all granted
17 Satisfy Any17 Satisfy Any
18 ErrorDocument 403 /static/offline/unauthorized.html18 ErrorDocument 403 /offline/unauthorized.html
19 ErrorDocument 404 /static/offline/notfound.html19 ErrorDocument 404 /offline/notfound.html
20 </Directory>20 </Directory>
2121
22 Alias /static /opt/canonical/landscape/canonical/landscape/static22 Alias /static /opt/canonical/landscape/canonical/landscape/static
23 Alias /offline /opt/canonical/landscape/canonical/landscape/offline
23 Alias /repository /var/lib/landscape/landscape-repository24 Alias /repository /var/lib/landscape/landscape-repository
24 Alias /config /opt/canonical/landscape/apacheroot25 Alias /config /opt/canonical/landscape/apacheroot
25 Alias /hash-id-databases /var/lib/landscape/hash-id-databases26 Alias /hash-id-databases /var/lib/landscape/hash-id-databases
@@ -59,4 +60,7 @@
59 <Location "/static">60 <Location "/static">
60 Options -Indexes61 Options -Indexes
61 </Location>62 </Location>
63 <Location "/offline">
64 Options -Indexes
65 </Location>
62</VirtualHost>66</VirtualHost>
6367
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2014-10-20 12:18:01 +0000
+++ hooks/hooks.py 2015-01-12 15:08:26 +0000
@@ -814,7 +814,7 @@
814 return util.is_db_up(database, host, user, password)814 return util.is_db_up(database, host, user, password)
815815
816816
817ERROR_PATH = "/opt/canonical/landscape/canonical/landscape/static/offline/"817ERROR_PATH = "/opt/canonical/landscape/canonical/landscape/offline/"
818ERROR_FILES = [818ERROR_FILES = [
819 {"http_status": 403,819 {"http_status": 403,
820 "path": ERROR_PATH + "unauthorized-haproxy.html"},820 "path": ERROR_PATH + "unauthorized-haproxy.html"},

Subscribers

People subscribed via source and target branches