Replace DOMAIN with example.com
Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
This commit is contained in:
@ -10,5 +10,5 @@ To get started, first follow the [front the integrated reverse-proxy webserver w
|
||||
|
||||
`matrix-domain.conf` contains configuration for the Matrix domain, which handles both the Client-Server API (port `443`) and the Matrix Federation API (port `8448`).
|
||||
|
||||
`matrix-client-element.conf` is an example for when you're hosting Element at `element.DOMAIN`.
|
||||
This configuration can also be used as an example for handling other domains, depending on the services you enable with the playbook (e.g. `dimension.DOMAIN`, etc).
|
||||
`matrix-client-element.conf` is an example for when you're hosting Element at `element.example.com`.
|
||||
This configuration can also be used as an example for handling other domains, depending on the services you enable with the playbook (e.g. `dimension.example.com`, etc).
|
||||
|
@ -1,23 +1,23 @@
|
||||
# This is a sample file demonstrating how to set up reverse-proxy for element.DOMAIN.
|
||||
# This is a sample file demonstrating how to set up reverse-proxy for element.example.com.
|
||||
# If you're not using Element (`matrix_client_element_enabled: false`), you won't need this.
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName element.DOMAIN
|
||||
ServerName element.example.com
|
||||
|
||||
# You may wish to handle the /.well-known/acme-challenge paths here somehow,
|
||||
# if you're using ACME (Let's Encrypt) certificates.
|
||||
|
||||
Redirect permanent / https://element.DOMAIN/
|
||||
Redirect permanent / https://element.example.com/
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName element.DOMAIN
|
||||
ServerName element.example.com
|
||||
|
||||
SSLEngine On
|
||||
|
||||
# If you manage SSL certificates by yourself, these paths will differ.
|
||||
SSLCertificateFile /matrix/ssl/config/live/element.DOMAIN/fullchain.pem
|
||||
SSLCertificateKeyFile /matrix/ssl/config/live/element.DOMAIN/privkey.pem
|
||||
SSLCertificateFile /matrix/ssl/config/live/element.example.com/fullchain.pem
|
||||
SSLCertificateKeyFile /matrix/ssl/config/live/element.example.com/privkey.pem
|
||||
|
||||
SSLProxyEngine on
|
||||
SSLProxyProtocol +TLSv1.2 +TLSv1.3
|
||||
@ -30,6 +30,6 @@
|
||||
ProxyPass / http://127.0.0.1:81/
|
||||
ProxyPassReverse / http://127.0.0.1:81/
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/element.DOMAIN-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/element.DOMAIN-access.log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/element.example.com-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/element.example.com-access.log combined
|
||||
</VirtualHost>
|
||||
|
@ -1,23 +1,23 @@
|
||||
# This is a sample file demonstrating how to set up reverse-proxy for matrix.DOMAIN
|
||||
# This is a sample file demonstrating how to set up reverse-proxy for matrix.example.com
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName matrix.DOMAIN
|
||||
ServerName matrix.example.com
|
||||
|
||||
# You may wish to handle the /.well-known/acme-challenge paths here somehow,
|
||||
# if you're using ACME (Let's Encrypt) certificates.
|
||||
|
||||
Redirect permanent / https://matrix.DOMAIN/
|
||||
Redirect permanent / https://matrix.example.com/
|
||||
</VirtualHost>
|
||||
|
||||
# Client-Server API
|
||||
<VirtualHost *:443>
|
||||
ServerName matrix.DOMAIN
|
||||
ServerName matrix.example.com
|
||||
|
||||
SSLEngine On
|
||||
|
||||
# If you manage SSL certificates by yourself, these paths will differ.
|
||||
SSLCertificateFile /path/to/matrix.DOMAIN/fullchain.pem
|
||||
SSLCertificateKeyFile /path/to/matrix.DOMAIN/privkey.pem
|
||||
SSLCertificateFile /path/to/matrix.example.com/fullchain.pem
|
||||
SSLCertificateKeyFile /path/to/matrix.example.com/privkey.pem
|
||||
|
||||
SSLProxyEngine on
|
||||
SSLProxyProtocol +TLSv1.2 +TLSv1.3
|
||||
@ -32,20 +32,20 @@
|
||||
ProxyPass / http://127.0.0.1:81/ retry=0 nocanon
|
||||
ProxyPassReverse / http://127.0.0.1:81/
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/matrix.DOMAIN-access.log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/matrix.example.com-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/matrix.example.com-access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
# Server-Server (federation) API
|
||||
Listen 8448
|
||||
<VirtualHost *:8448>
|
||||
ServerName matrix.DOMAIN
|
||||
ServerName matrix.example.com
|
||||
|
||||
SSLEngine On
|
||||
|
||||
# If you manage SSL certificates by yourself, these paths will differ.
|
||||
SSLCertificateFile /matrix/ssl/config/live/matrix.DOMAIN/fullchain.pem
|
||||
SSLCertificateKeyFile /matrix/ssl/config/live/matrix.DOMAIN/privkey.pem
|
||||
SSLCertificateFile /matrix/ssl/config/live/matrix.example.com/fullchain.pem
|
||||
SSLCertificateKeyFile /matrix/ssl/config/live/matrix.example.com/privkey.pem
|
||||
|
||||
SSLProxyEngine on
|
||||
SSLProxyProtocol +TLSv1.2 +TLSv1.3
|
||||
@ -60,6 +60,6 @@ Listen 8448
|
||||
ProxyPass / http://127.0.0.1:8449/ retry=0 nocanon
|
||||
ProxyPassReverse / http://127.0.0.1:8449/
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/matrix.DOMAIN-access.log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/matrix.example.com-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/matrix.example.com-access.log combined
|
||||
</VirtualHost>
|
||||
|
@ -21,14 +21,14 @@ Open the 'Proxy Hosts' page in the NPM web interface and select `Add Proxy Host`
|
||||
```md
|
||||
# Details
|
||||
# Matrix web proxy config
|
||||
Domain Names: matrix.DOMAIN
|
||||
Domain Names: matrix.example.com
|
||||
Scheme: http
|
||||
Forward Hostname/IP: IP-ADDRESS-OF-YOUR-MATRIX
|
||||
Forward Port: 81
|
||||
|
||||
# SSL
|
||||
# Either 'Request a new certificate' or select an existing one
|
||||
SSL Certificate: matrix.DOMAIN or *.DOMAIN
|
||||
SSL Certificate: matrix.example.com or *.example.com
|
||||
Force SSL: true
|
||||
HTTP/2 Support: true
|
||||
|
||||
@ -42,14 +42,14 @@ Again, under the 'Proxy Hosts' page select `Add Proxy Host`, this time for your
|
||||
```md
|
||||
# Details
|
||||
# Matrix Federation proxy config
|
||||
Domain Names: matrix.DOMAIN:8448
|
||||
Domain Names: matrix.example.com:8448
|
||||
Scheme: http
|
||||
Forward Hostname/IP: IP-ADDRESS-OF-YOUR-MATRIX
|
||||
Forward Port: 8449
|
||||
|
||||
# SSL
|
||||
# Either 'Request a new certificate' or select an existing one
|
||||
SSL Certificate: matrix.DOMAIN or *.DOMAIN
|
||||
SSL Certificate: matrix.example.com or *.example.com
|
||||
Force SSL: true
|
||||
HTTP/2 Support: true
|
||||
|
||||
@ -60,4 +60,4 @@ Custom Nginx Configuration:
|
||||
client_max_body_size 50M;
|
||||
```
|
||||
|
||||
Also note, NPM would need to be configured for whatever other services you are using. For example, you would need to create additional proxy hosts for `element.DOMAIN` or `jitsi.DOMAIN`, which would use the forwarding port `81`.
|
||||
Also note, NPM would need to be configured for whatever other services you are using. For example, you would need to create additional proxy hosts for `element.example.com` or `jitsi.example.com`, which would use the forwarding port `81`.
|
||||
|
@ -12,6 +12,6 @@ To get started, first follow the [front the integrated reverse-proxy webserver w
|
||||
|
||||
Copy the [matrix.conf](matrix.conf) file to your nginx server's filesystem, modify it to your needs and include it in your nginx configuration (e.g. `include /path/to/matrix.conf;`).
|
||||
|
||||
This configuration **disables SSL certificate retrieval**, so you will **need to obtain SSL certificates manually** (e.g. by using [certbot](https://certbot.eff.org/)) and set the appropriate path in `matrix.conf`. In the example nginx configuration, a single certificate is used for all subdomains (`matrix.DOMAIN`, `element.DOMAIN`, etc.). For your setup, may wish to change this and use separate `server` blocks and separate certificate files for each host.
|
||||
This configuration **disables SSL certificate retrieval**, so you will **need to obtain SSL certificates manually** (e.g. by using [certbot](https://certbot.eff.org/)) and set the appropriate path in `matrix.conf`. In the example nginx configuration, a single certificate is used for all subdomains (`matrix.example.com`, `element.example.com`, etc.). For your setup, may wish to change this and use separate `server` blocks and separate certificate files for each host.
|
||||
|
||||
Also note that your copy of the `matrix.conf` file has to be adapted to whatever services you are using. For example, remove `element.example.com` from the `server_name` list if you don't use [Element](../../../docs/configuring-playbook-client-element.md) web client or add `dimension.example.com` to it if you do use the [Dimension](../../../docs/configuring-playbook-dimension.md) integration manager.
|
||||
|
Reference in New Issue
Block a user