From 2dca3ece8e8438cb15bbaa962d3adc8d729ed785 Mon Sep 17 00:00:00 2001 From: vasraz Date: Wed, 9 Feb 2022 15:55:38 +0000 Subject: Redirect root URL to sdc1 Change-Id: I792cf2bfbb2f8f1e891d30048ff63acefac3604e Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3877 --- .../recipes/FE_7_create_jetty_modules.rb | 10 ++++++++-- .../templates/default/FE-jetty-rewrite.yaml.erb | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-jetty-rewrite.yaml.erb (limited to 'catalog-fe/sdc-frontend/chef-repo/cookbooks') diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb index 0a1527f05e..fb70924d36 100644 --- a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb +++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/recipes/FE_7_create_jetty_modules.rb @@ -7,7 +7,7 @@ else end execute "create-jetty-modules" do - command "java -jar #{ENV['JETTY_HOME']}/start.jar --add-to-start=deploy && java -jar #{ENV['JETTY_HOME']}/start.jar --create-startd --add-to-start=http,https,console-capture,setuid" + command "java -jar #{ENV['JETTY_HOME']}/start.jar --add-to-start=deploy && java -jar #{ENV['JETTY_HOME']}/start.jar --create-startd --add-to-start=http,https,console-capture,setuid,rewrite" cwd "#{ENV['JETTY_BASE']}" action :run end @@ -24,7 +24,6 @@ template "http-ini" do }) end - template "https-ini" do path "#{ENV['JETTY_BASE']}/start.d/https.ini" source "https-ini.erb" @@ -34,6 +33,13 @@ template "https-ini" do variables :https_port => "#{node['FE'][:https_port]}" end +template "jetty-rewrite" do + path "#{ENV['JETTY_BASE']}/etc/rewrite-root-to-sdc1.xml" + source "FE-jetty-rewrite.yaml.erb" + owner "#{ENV['JETTY_USER']}" + group "#{ENV['JETTY_GROUP']}" + mode "0644" +end template "ssl-ini" do path "#{ENV['JETTY_BASE']}/start.d/ssl.ini" diff --git a/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-jetty-rewrite.yaml.erb b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-jetty-rewrite.yaml.erb new file mode 100644 index 0000000000..e0862a5bfd --- /dev/null +++ b/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/FE-jetty-rewrite.yaml.erb @@ -0,0 +1,19 @@ + + + + + + + + /sdc1 + + + + + + + + + false + + -- cgit 1.2.3-korg