-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathetherpad.ssl.conf
36 lines (32 loc) · 1.39 KB
/
etherpad.ssl.conf
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
<VirtualHost *:443>
ServerName ETHERPAD_WEB_ADDRESS
# SSL configuration
SSLEngine on
# If you hold wildcard certificates for your domain the next two lines are not necessary.
SSLCertificateFile "/etc/letsencrypt/live/ETHERPAD_WEB_ADDRESS/cert.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/ETHERPAD_WEB_ADDRESS/privkey.pem"
ProxyVia On
ProxyRequests Off
ProxyPreserveHost on
<Location />
ProxyPass http://localhost:ETHERPAD_PORT/ retry=0 timeout=30
ProxyPassReverse http://localhost:ETHERPAD_PORT/
</Location>
<Location /socket.io>
# This is needed to handle the websocket transport through the proxy, since
# etherpad does not use a specific sub-folder, such as /ws/ to handle this kind of traffic.
# Taken from https://github.com/ether/etherpad-lite/issues/2318#issuecomment-63548542
# Thanks to beaugunderson for the semantics
RewriteEngine On
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://localhost:ETHERPAD_PORT/socket.io/$1 [P,L]
ProxyPass http://localhost:ETHERPAD_PORT/socket.io retry=0 timeout=30
ProxyPassReverse http://localhost:ETHERPAD_PORT/socket.io
</Location>
<Proxy *>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Proxy>
</VirtualHost>