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
1=== modified file 'config/vhostssl.tmpl'
2--- config/vhostssl.tmpl 2014-10-17 13:50:31 +0000
3+++ config/vhostssl.tmpl 2015-01-12 15:08:26 +0000
4@@ -49,6 +49,7 @@
5 RewriteRule ^/attachment/(.*) http://{{ haproxy_msgserver }}/attachment/$1 [P,L]
6 RewriteRule ^/upload/(.*) http://{{ haproxy_packageupload }}/$1 [P,L]
7 RewriteRule ^/(static.*) http://{{ haproxy_static }}/$1 [P,L]
8+ RewriteRule ^/(offline.*) http://{{ haproxy_static }}/$1 [P,L]
9 RewriteRule ^/(config.*) http://{{ haproxy_static }}/$1 [P,L]
10 RewriteRule ^/(hash-id-databases.*) http://{{ haproxy_static }}/$1 [P,L]
11 RewriteRule ^/(repository.*) http://{{ haproxy_static }}/$1 [P,L]
12
13=== modified file 'hooks/conf/landscape-http'
14--- hooks/conf/landscape-http 2014-05-23 17:53:45 +0000
15+++ hooks/conf/landscape-http 2015-01-12 15:08:26 +0000
16@@ -15,11 +15,12 @@
17 Allow from all
18 Require all granted
19 Satisfy Any
20- ErrorDocument 403 /static/offline/unauthorized.html
21- ErrorDocument 404 /static/offline/notfound.html
22+ ErrorDocument 403 /offline/unauthorized.html
23+ ErrorDocument 404 /offline/notfound.html
24 </Directory>
25
26 Alias /static /opt/canonical/landscape/canonical/landscape/static
27+ Alias /offline /opt/canonical/landscape/canonical/landscape/offline
28 Alias /repository /var/lib/landscape/landscape-repository
29 Alias /config /opt/canonical/landscape/apacheroot
30 Alias /hash-id-databases /var/lib/landscape/hash-id-databases
31@@ -59,4 +60,7 @@
32 <Location "/static">
33 Options -Indexes
34 </Location>
35+ <Location "/offline">
36+ Options -Indexes
37+ </Location>
38 </VirtualHost>
39
40=== modified file 'hooks/hooks.py'
41--- hooks/hooks.py 2014-10-20 12:18:01 +0000
42+++ hooks/hooks.py 2015-01-12 15:08:26 +0000
43@@ -814,7 +814,7 @@
44 return util.is_db_up(database, host, user, password)
45
46
47-ERROR_PATH = "/opt/canonical/landscape/canonical/landscape/static/offline/"
48+ERROR_PATH = "/opt/canonical/landscape/canonical/landscape/offline/"
49 ERROR_FILES = [
50 {"http_status": 403,
51 "path": ERROR_PATH + "unauthorized-haproxy.html"},

Subscribers

People subscribed via source and target branches