ansible/roles/matrix/templates/apache2-vhost-ssl.conf
Salt 5624967fd9 Alias Matrix vhost to server name
Turns out Matrix actually sends the delegated host in the Host: field, which is probably why this fails
Interdasting
https://matrix.org/docs/spec/server_server/latest#resolving-server-names
2020-06-26 11:24:57 -05:00

33 lines
1020 B
ApacheConf

# Configuration for {{ matrix_url }}
# vim:ft=apache:
# Accept connections from non-SNI clients
SSLStrictSNIVHostCheck off
# Need this for SSL proxying, apparently
SSLProxyEngine on
# Website configuration
<VirtualHost *:80>
ServerName {{ matrix_url }}
Redirect permanent / https://{{ matrix_url }}
</VirtualHost>
<VirtualHost *:443 *:8448>
SSLEngine on
SSLCertificateFile /etc/pki/cert/crt/{{ matrix_url }}.crt
SSLCertificateKeyFile /etc/pki/cert/private/{{ matrix_url }}.key
SSLCertificateChainFile /etc/pki/cert/crt/{{ matrix_url }}-fullchain.crt
SSLProtocol {{ ssl_protocol }}
SSLCipherSuite {{ ssl_cipher_suite }}
ServerName {{ matrix_url }}
ServerAlias {{ matrix_server_name }}
DocumentRoot {{ matrix_webroot }}
<Directory "{{ matrix_webroot }}">
Require all granted
AllowOverride All
Options MultiViews FollowSymlinks
</Directory>
AllowEncodedSlashes NoDecode
ProxyPass /_matrix http://127.0.0.1:8008/_matrix nocanon
ProxyPassReverse /_matrix https://127.0.0.1:8008/_matrix
</VirtualHost>