Rely on servername not virtualhost name resolution

We recently broke our /etc/hosts content on our servers then restored it
to a sane default for each server. This would have removed any special
entries servers may have had. It appears that refstack was relying on
such special entries to make the named virtualhost entries work. With
the new /etc/hosts content our vhosts weren't serving content.

Fix this by removing the named vhost entries and instead rely on
ServerName to specify where requests go.

Change-Id: I8b8242b1b6d9b2bb072ace5b82a65899fe383056
This commit is contained in:
Clark Boylan 2019-05-13 14:38:43 -07:00
parent b712a03c46
commit 7d2bf8ef50
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
<VirtualHost <%= scope.lookupvar('::refstack::apache::http::hostname') %>:80>
<VirtualHost *:80>
<% if !!scope.lookupvar('::refstack::apache::http::server_admin') %>
ServerAdmin <%= scope.lookupvar('::refstack::apache::http::server_admin') %>
<% end %>

View File

@ -1,4 +1,4 @@
<VirtualHost <%= scope.lookupvar('::refstack::apache::https::hostname') %>:80>
<VirtualHost *:80>
<% if !!scope.lookupvar('::refstack::apache::https::server_admin') %>
ServerAdmin <%= scope.lookupvar('::refstack::apache::https::server_admin') %>
<% end %>
@ -14,7 +14,7 @@
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost <%= scope.lookupvar('::refstack::apache::https::hostname') %>:443>
<VirtualHost *:443>
<% if !!scope.lookupvar('::refstack::apache::https::server_admin') %>
ServerAdmin <%= scope.lookupvar('::refstack::apache::https::server_admin') %>
<% end %>