diff options
author | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-05-31 21:35:04 -0400 |
---|---|---|
committer | Stonewall Jackson <stonewall@sacredheartsc.com> | 2023-05-31 21:35:04 -0400 |
commit | 236d813994acd076ce96d764d569ee6bb3da98f9 (patch) | |
tree | 33f811ba7f557032601356218ff11d67a4895ffe /roles/apache_vhost/templates/etc/httpd/conf.d | |
parent | 9cbb7d043e7379f9d7e7c81cd75fcd2176a0b322 (diff) | |
download | selfhosted-236d813994acd076ce96d764d569ee6bb3da98f9.tar.gz selfhosted-236d813994acd076ce96d764d569ee6bb3da98f9.zip |
add synapse role
Diffstat (limited to 'roles/apache_vhost/templates/etc/httpd/conf.d')
-rw-r--r-- | roles/apache_vhost/templates/etc/httpd/conf.d/vhost.conf.j2 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/roles/apache_vhost/templates/etc/httpd/conf.d/vhost.conf.j2 b/roles/apache_vhost/templates/etc/httpd/conf.d/vhost.conf.j2 index 12a682e..4eae9af 100644 --- a/roles/apache_vhost/templates/etc/httpd/conf.d/vhost.conf.j2 +++ b/roles/apache_vhost/templates/etc/httpd/conf.d/vhost.conf.j2 @@ -1,5 +1,5 @@ -{% if apache_use_ssl and apache_redirect_to_https %} -<VirtualHost {{ apache_listen }}:80> +{% if apache_use_ssl and apache_redirect_to_https and not apache_ssl_only %} +<VirtualHost {{ apache_listen_ip }}:80> ServerName {{ apache_server_name }} {% for alias in apache_server_aliases %} ServerAlias {{ alias }} @@ -15,10 +15,10 @@ RewriteRule (.*) https://%{HTTP_HOST}$1 [R=permanent,L] </VirtualHost> -{% else %} +{% elif not apache_ssl_only %} {% if apache_canonical_hostname is defined and (apache_server_aliases | length > 0) %} -<VirtualHost {{ apache_listen }}:80> +<VirtualHost {{ apache_listen_ip }}:{{ apache_listen_port | default(80) }}> {% for alias in ([apache_server_name] + apache_server_aliases) | reject('equalto', apache_canonical_hostname) | list %} {% if loop.first %} ServerName {{ alias }} @@ -36,7 +36,7 @@ </VirtualHost> {% endif %} -<VirtualHost {{ apache_listen }}:80> +<VirtualHost {{ apache_listen_ip }}:{{ apache_listen_port | default(80) }}> {% if apache_document_root is defined %} DocumentRoot "{{ apache_document_root }}" {% endif %} @@ -73,7 +73,7 @@ {% if apache_use_ssl %} {% if apache_canonical_hostname is defined and (apache_server_aliases | length > 0) %} -<VirtualHost {{ apache_listen }}:443> +<VirtualHost {{ apache_listen_ip }}:{{ apache_listen_port | default(443) }}> {% for alias in ([apache_server_name] + apache_server_aliases) | reject('equalto', apache_canonical_hostname) | list %} {% if loop.first %} ServerName {{ alias }} @@ -96,7 +96,7 @@ </VirtualHost> {% endif %} -<VirtualHost {{ apache_listen }}:443> +<VirtualHost {{ apache_listen_ip }}:{{ apache_listen_port | default(443) }}> {% if apache_document_root is defined %} DocumentRoot "{{ apache_document_root }}" {% endif %} |