From: Honza Pokorny Date: Wed, 28 Sep 2016 12:23:30 +0000 (-0300) Subject: Use FallbackResource instead of Rewrite for UI X-Git-Tag: opnfv-6.0.0~555^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=26255c86692687675a22d1ae2f0a3feea8750cb6;p=apex-puppet-tripleo.git Use FallbackResource instead of Rewrite for UI The original configuration produced a 400 error for all requests. The new FallbackResource directive accomplishes our task in a more elegant fashion. Change-Id: Ib5d77d158e73acc63d5c0c85d6aa6d99d2176333 Closes-Bug: 1628484 --- diff --git a/manifests/ui.pp b/manifests/ui.pp index 0a12af0..c73d984 100644 --- a/manifests/ui.pp +++ b/manifests/ui.pp @@ -82,19 +82,13 @@ class tripleo::ui ( ) { ::apache::vhost { 'tripleo-ui': - ensure => 'present', - servername => $servername, - ip => $bind_host, - port => $ui_port, - docroot => '/var/www/openstack-tripleo-ui/dist', - options => ['Indexes', 'FollowSymLinks'], - rewrites => [ - { - comment => 'Redirect 404 to index', - rewrite_cond => ['%{REQUEST_FILENAME} !-f', '%{REQUEST_FILENAME} !-d'], - rewrite_rule => ['(.*) index.html'], - }, - ], + ensure => 'present', + servername => $servername, + ip => $bind_host, + port => $ui_port, + docroot => '/var/www/openstack-tripleo-ui/dist', + options => ['Indexes', 'FollowSymLinks'], + fallbackresource => '/index.html', } file { '/var/www/openstack-tripleo-ui/dist/tripleo_ui_config.js' :