Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Support multiple virtual hosts #174

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@
default['stash']['apache2']['access_log'] = ''
default['stash']['apache2']['error_log'] = ''
default['stash']['apache2']['port'] = 80
default['stash']['apache2']['virtual_host_alias'] = node['fqdn']
default['stash']['apache2']['virtual_host_primary'] = node['fqdn']
default['stash']['apache2']['virtual_host_alias'] = node['stash']['apache2']['virtual_host_primary']
default['stash']['apache2']['virtual_host_name'] = node['hostname']

default['stash']['apache2']['ssl']['access_log'] = ''
Expand Down
2 changes: 1 addition & 1 deletion templates/default/3.8+/server.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
redirectPort="<%= node['stash']['apache2']['ssl']['port'] %>"
secure="true"
scheme="https"
proxyName="<%= node['stash']['apache2']['virtual_host_alias'] %>"
proxyName="<%= node['stash']['apache2']['virtual_host_primary'] %>"
proxyPort="<%= node['stash']['apache2']['ssl']['port'] %>"
<% else -%>
redirectPort="<%= node['stash']['tomcat']['ssl_port'] %>"
Expand Down
2 changes: 1 addition & 1 deletion templates/default/bitbucket/server.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
redirectPort="<%= node['stash']['apache2']['ssl']['port'] %>"
secure="true"
scheme="https"
proxyName="<%= node['stash']['apache2']['virtual_host_alias'] %>"
proxyName="<%= node['stash']['apache2']['virtual_host_primary'] %>"
proxyPort="<%= node['stash']['apache2']['ssl']['port'] %>"
<% else -%>
redirectPort="<%= node['stash']['tomcat']['ssl_port'] %>"
Expand Down
4 changes: 2 additions & 2 deletions templates/default/server-tomcat7.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
redirectPort="<%= node['stash']['apache2']['ssl']['port'] %>"
secure="true"
scheme="https"
proxyName="<%= node['stash']['apache2']['virtual_host_alias'] %>"
proxyName="<%= node['stash']['apache2']['virtual_host_primary'] %>"
proxyPort="<%= node['stash']['apache2']['ssl']['port'] %>"
<% else -%>
redirectPort="<%= node['stash']['tomcat']['ssl_port'] %>"
Expand Down Expand Up @@ -193,4 +193,4 @@
</Host>
</Engine>
</Service>
</Server>
</Server>
2 changes: 1 addition & 1 deletion templates/default/server-tomcat8.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
redirectPort="<%= node['stash']['apache2']['ssl']['port'] %>"
secure="true"
scheme="https"
proxyName="<%= node['stash']['apache2']['virtual_host_alias'] %>"
proxyName="<%= node['stash']['apache2']['virtual_host_primary'] %>"
proxyPort="<%= node['stash']['apache2']['ssl']['port'] %>"
<% else -%>
redirectPort="<%= node['stash']['tomcat']['ssl_port'] %>"
Expand Down
2 changes: 1 addition & 1 deletion templates/default/server.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
secure="true"
scheme="https"
proxyName="<%= node['stash']['apache2']['virtual_host_alias'] %>"
proxyName="<%= node['stash']['apache2']['virtual_host_primary'] %>"
proxyPort="<%= node['stash']['apache2']['ssl']['port'] %>"
redirectPort="<%= node['stash']['apache2']['ssl']['port'] %>"
/>
Expand Down