roles/apache: Set ServerName in default SSL vhost

The `ServerName` directive needs to be set inside the default SSL vhost,
as this property does not get inherited from the global configuration,
and it is needs to be set in order for SNI to work correctly.
jenkins-master
Dustin 2018-12-30 15:20:56 -06:00
parent ea1f52814d
commit 52a9fb1c0e
1 changed files with 4 additions and 0 deletions

View File

@ -58,7 +58,11 @@ SSLCryptoDevice builtin
# General setup for the virtual host, inherited from global configuration # General setup for the virtual host, inherited from global configuration
#DocumentRoot "/var/www/html" #DocumentRoot "/var/www/html"
{% if apache_server_name is defined %}
ServerName {{ apache_server_name }}
{% else %}
#ServerName www.example.com:443 #ServerName www.example.com:443
{% endif %}
Include conf.d/ssl.include Include conf.d/ssl.include