Fixed markup formatting for code block
This commit is contained in:
parent
dde644bfe4
commit
280564aa30
@ -32,69 +32,69 @@ matrix_nginx_proxy_enabled: false
|
|||||||
|
|
||||||
1. Create a new apache configuration file named 000-matrix-ssl.conf and enable it.
|
1. Create a new apache configuration file named 000-matrix-ssl.conf and enable it.
|
||||||
|
|
||||||
# Auto redirect http to https
|
# Auto redirect http to https
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName matrix.DOMAIN
|
ServerName matrix.DOMAIN
|
||||||
Redirect permanent / https://matrix.DOMAIN/
|
Redirect permanent / https://matrix.DOMAIN/
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
ServerName matrix.DOMAIN
|
ServerName matrix.DOMAIN
|
||||||
|
|
||||||
SSLEngine On
|
SSLEngine On
|
||||||
SSLCertificateFile /etc/letsencrypt/live/DOMAIN/fullchain.pem
|
SSLCertificateFile /etc/letsencrypt/live/DOMAIN/fullchain.pem
|
||||||
SSLCertificateKeyFile /etc/letsencrypt/live/DOMAIN/privkey.pem
|
SSLCertificateKeyFile /etc/letsencrypt/live/DOMAIN/privkey.pem
|
||||||
|
|
||||||
SSLProxyEngine on
|
SSLProxyEngine on
|
||||||
SSLProxyProtocol +TLSv1.1 +TLSv1.2
|
SSLProxyProtocol +TLSv1.1 +TLSv1.2
|
||||||
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
|
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
|
||||||
|
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
ProxyVia On
|
ProxyVia On
|
||||||
# Keep /.well-known/matrix/client and /_matrix/identity free for different proxy/location
|
# Keep /.well-known/matrix/client and /_matrix/identity free for different proxy/location
|
||||||
ProxyPassMatch ^/.well-known/matrix/client !
|
ProxyPassMatch ^/.well-known/matrix/client !
|
||||||
ProxyPassMatch ^/_matrix/identity !
|
ProxyPassMatch ^/_matrix/identity !
|
||||||
# Proxy all 443 traffic to the synapse matrix client api
|
# Proxy all 443 traffic to the synapse matrix client api
|
||||||
ProxyPass / http://localhost:8008/
|
ProxyPass / http://localhost:8008/
|
||||||
ProxyPassReverse / http://localhost:8008/
|
ProxyPassReverse / http://localhost:8008/
|
||||||
|
|
||||||
# Map /.well-known/matrix/client for client discovery
|
# Map /.well-known/matrix/client for client discovery
|
||||||
Alias /.well-known/matrix/client /matrix/static-files/.well-known/matrix/client
|
Alias /.well-known/matrix/client /matrix/static-files/.well-known/matrix/client
|
||||||
<Files "/matrix/static-files/.well-known/matrix/client">
|
<Files "/matrix/static-files/.well-known/matrix/client">
|
||||||
Require all granted
|
Require all granted
|
||||||
</Files>
|
</Files>
|
||||||
<Location "/.well-known/matrix/client>
|
<Location "/.well-known/matrix/client>
|
||||||
Header always set Content-Type "application/json"
|
Header always set Content-Type "application/json"
|
||||||
Header always set Access-Control-Allow-Origin "*"
|
Header always set Access-Control-Allow-Origin "*"
|
||||||
</Location>
|
</Location>
|
||||||
<Directory /matrix/static-files/.well-known/matrix/>
|
<Directory /matrix/static-files/.well-known/matrix/>
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
# Apache 2.4:
|
# Apache 2.4:
|
||||||
Require all granted
|
Require all granted
|
||||||
# Or for Apache 2.2:
|
# Or for Apache 2.2:
|
||||||
#order allow,deny
|
#order allow,deny
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
# Map /_matrix/identity to the identity server
|
# Map /_matrix/identity to the identity server
|
||||||
<Location /_matrix/identity>
|
<Location /_matrix/identity>
|
||||||
ProxyPass http://localhost:8090/_matrix/identity
|
ProxyPass http://localhost:8090/_matrix/identity
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/synapse-error.log
|
ErrorLog ${APACHE_LOG_DIR}/synapse-error.log
|
||||||
CustomLog ${APACHE_LOG_DIR}/synapse-access.log combined
|
CustomLog ${APACHE_LOG_DIR}/synapse-access.log combined
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
2. Enable required apache2 modules
|
2. Enable required apache2 modules
|
||||||
|
|
||||||
a2enmod proxy
|
a2enmod proxy
|
||||||
a2enmod proxy_http
|
a2enmod proxy_http
|
||||||
a2enmod proxy_connect
|
a2enmod proxy_connect
|
||||||
a2enmod proxy_html
|
a2enmod proxy_html
|
||||||
a2enmod headers
|
a2enmod headers
|
||||||
|
|
||||||
3. Reload apache
|
3. Reload apache
|
||||||
|
|
||||||
systemctl restart apache2
|
systemctl restart apache2
|
||||||
|
|
||||||
Notes: port 8448 does not get proxied and is left available for the homeserver federation api.
|
Notes: port 8448 does not get proxied and is left available for the homeserver federation api.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user