Skip to content

Commit

Permalink
Added support for multiple domains for Apache config in portal genera…
Browse files Browse the repository at this point in the history
…tor (#3264)
  • Loading branch information
abujeda committed Jan 2, 2024
1 parent 8aa5bea commit 20283d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ood-portal-generator/spec/fixtures/ood-portal.conf.all
Expand Up @@ -67,6 +67,7 @@ Listen 8080
CustomLog "/path/to/my/logs/test.server.name_access_ssl.log" combined

RewriteEngine On
RewriteCond %{HTTP_HOST} !^(foo.example.com(:8080)?)?$ [NC]
RewriteCond %{HTTP_HOST} !^(test.proxy.name(:8080)?)?$ [NC]
RewriteRule ^(.*) https://test.proxy.name:8080$1 [R=301,NE,L]

Expand Down
4 changes: 3 additions & 1 deletion ood-portal-generator/templates/ood-portal.conf.erb
Expand Up @@ -87,7 +87,9 @@ Listen <%= addr_port %>
<%- if @servername && @use_rewrites -%>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(<%= @proxy_server %>(:<%= @port %>)?)?$ [NC]
<%- (@server_aliases + [@proxy_server]).each do |server| -%>
RewriteCond %{HTTP_HOST} !^(<%= server %>(:<%= @port %>)?)?$ [NC]
<%- end -%>
RewriteRule ^(.*) <%= @ssl ? "https" : "http" %>://<%= @proxy_server %>:<%= @port %>$1 [R=301,NE,L]
<%- end -%>
Expand Down

0 comments on commit 20283d3

Please sign in to comment.