-
Notifications
You must be signed in to change notification settings - Fork 0
/
synapse_draft.txt
48 lines (33 loc) · 1.24 KB
/
synapse_draft.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# DRAFT - Synapse using Apache proxy and PostgreSQL (maybe switching to nginx later)
1 - Server hardening
2 - Matrix synapse
3 - Let's Encrypt
certbot certonly --rsa-key-size 4096 --standalone --agree-tos --no-eff-email --email [email protected] -d domain.name
renew later...
3 - Apache config
<VirtualHost *:443>
servername domain.name
ServerAlias domain.name
Redirect permanent / https://domain.name
RewriteEngine off
#RewriteRule /login.view[/]?$ /login.view [R=permanent]
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/domain.name/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.name/privkey.pem
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
ProxyRequests On
ProxyPreserveHost Off
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPassReverse / http://127.0.0.1:8008/ nocanon
ProxyPass / http://127.0.0.1:8008/ nocanon
</Virtualhost>
<VirtualHost *:80>
ServerAlias domain.name
Redirect permanent / https://domain.name/
</Virtualhost>
sudo a2enmod rewrite ssl proxy proxy_http headers
sudo a2ensite domain.name
sudo systemctl restart apache2