2020-07-17 16:31:20 +08:00
|
|
|
# This is a sample file demonstrating how to set up reverse-proxy for element.DOMAIN.
|
|
|
|
# If you're not using Element (`matrix_client_element_enabled: false`), you won't need this.
|
2019-02-01 22:51:18 +08:00
|
|
|
|
|
|
|
<VirtualHost *:80>
|
2020-07-17 16:31:20 +08:00
|
|
|
ServerName element.DOMAIN
|
2019-02-01 22:51:18 +08:00
|
|
|
|
2019-03-19 02:45:17 +08:00
|
|
|
ProxyVia On
|
|
|
|
|
2019-02-01 22:51:18 +08:00
|
|
|
# Map /.well-known/acme-challenge to the certbot server
|
|
|
|
# If you manage SSL certificates by yourself, this will differ.
|
|
|
|
<Location /.well-known/acme-challenge>
|
|
|
|
ProxyPreserveHost On
|
2019-02-05 17:11:28 +08:00
|
|
|
ProxyPass http://127.0.0.1:2402/.well-known/acme-challenge
|
2019-02-01 22:51:18 +08:00
|
|
|
</Location>
|
|
|
|
|
2020-07-17 16:31:20 +08:00
|
|
|
Redirect permanent / https://element.DOMAIN/
|
2019-02-01 22:51:18 +08:00
|
|
|
</VirtualHost>
|
|
|
|
|
|
|
|
<VirtualHost *:443>
|
2020-07-17 16:31:20 +08:00
|
|
|
ServerName element.DOMAIN
|
2019-02-01 22:51:18 +08:00
|
|
|
|
|
|
|
SSLEngine On
|
|
|
|
|
|
|
|
# If you manage SSL certificates by yourself, these paths will differ.
|
2020-07-17 16:31:20 +08:00
|
|
|
SSLCertificateFile /matrix/ssl/config/live/element.DOMAIN/fullchain.pem
|
|
|
|
SSLCertificateKeyFile /matrix/ssl/config/live/element.DOMAIN/privkey.pem
|
2019-02-01 22:51:18 +08:00
|
|
|
|
|
|
|
SSLProxyEngine on
|
2020-01-30 18:56:20 +08:00
|
|
|
SSLProxyProtocol +TLSv1.2 +TLSv1.3
|
2019-02-01 22:51:18 +08:00
|
|
|
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
|
|
|
|
|
|
|
|
ProxyPreserveHost On
|
|
|
|
ProxyRequests Off
|
|
|
|
ProxyVia On
|
|
|
|
|
2019-02-05 17:11:28 +08:00
|
|
|
ProxyPass / http://127.0.0.1:8765/
|
|
|
|
ProxyPassReverse / http://127.0.0.1:8765/
|
2019-02-01 22:51:18 +08:00
|
|
|
|
2020-07-17 16:31:20 +08:00
|
|
|
ErrorLog ${APACHE_LOG_DIR}/element.DOMAIN-error.log
|
|
|
|
CustomLog ${APACHE_LOG_DIR}/element.DOMAIN-access.log combined
|
2019-02-01 22:51:18 +08:00
|
|
|
</VirtualHost>
|