Actually proxypass properly

This commit is contained in:
Salt 2020-06-22 05:34:01 -05:00
parent 56057012b5
commit 9ca53861a5

View File

@ -11,7 +11,7 @@ SSLProxyEngine on
ServerName {{ matrix_url }} ServerName {{ matrix_url }}
Redirect permanent / https://{{ matrix_url }} Redirect permanent / https://{{ matrix_url }}
</VirtualHost> </VirtualHost>
<VirtualHost *:443> <VirtualHost *:443 *:8448>
SSLEngine on SSLEngine on
SSLCertificateFile /etc/pki/cert/crt/{{ matrix_url }}.crt SSLCertificateFile /etc/pki/cert/crt/{{ matrix_url }}.crt
SSLCertificateKeyFile /etc/pki/cert/private/{{ matrix_url }}.key SSLCertificateKeyFile /etc/pki/cert/private/{{ matrix_url }}.key
@ -25,22 +25,9 @@ SSLProxyEngine on
AllowOverride All AllowOverride All
Options MultiViews FollowSymlinks Options MultiViews FollowSymlinks
</Directory> </Directory>
RequestHeader set X_FORWARDED_PROTO 'https' AllowEncodedSlashes NoDecode
RequestHeader set X-Forwarded-Ssl on ProxyPass /_matrix http://127.0.0.1:8008/ nocanon retry=1
</VirtualHost> ProxyPassReverse /_matrix https://127.0.0.1:8008/
<VirtualHost *: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 }}
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://127.0.0.1:8008/ nocanon retry=1
ProxyPassReverse / https://127.0.0.1:8008/
RequestHeader set X_FORWARDED_PROTO 'https' RequestHeader set X_FORWARDED_PROTO 'https'
RequestHeader set X-Forwarded-Ssl on RequestHeader set X-Forwarded-Ssl on
</VirtualHost> </VirtualHost>