Etherpad lite: Unterschied zwischen den Versionen

Aus Vosp.info
Wechseln zu:Navigation, Suche
Zeile 22: Zeile 22:
 
* https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#apache
 
* https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#apache
  
<source lang=asdfnasdnf>
+
* /etc/apache2/sites-available/pad.domain.tld.conf
 +
 
 +
<source lang=apache>
 +
<VirtualHost *:80>
 +
        ServerName  pad.domain.tld
 +
        ServerAlias www.pad.domain.tld
 +
        ServerAdmin webmaster@localhost
 +
        Redirect permanent / https://pad.domain.tld/
 +
</VirtualHost>
 +
 
 +
 
 +
<IfModule mod_ssl.c>
 +
    <VirtualHost *:443>
 +
        ServerName pad.domain.tld
 +
        ServerAlias www.pad.domain.tld
 +
 
 +
        # SSL configuration
 +
        SSLEngine on
 +
        # If you hold wildcard certificates for your domain the next two lines are not necessary.
 +
        SSLCertificateFile /etc/ssl/private/nc/SSLCertificateFile.crt
 +
        SSLCertificateKeyFile /etc/ssl/private/nc/SSLCertificateKeyFile.key
 +
        # nc bof
 +
        SSLCertificateChainFile /etc/ssl/private/nc/SSLCertificateChainFile.cer
 +
        SetEnv nokeepalive ssl-unclean-shutdown
 +
        # nc eof
 +
       
 +
        ProxyVia On
 +
        ProxyRequests Off
 +
        ProxyPreserveHost on   
 +
 
 +
        <Location />
 +
            AuthType Basic
 +
            AuthName "Welcome to the domain.org Etherpad"
 +
            AuthUserFile /etc/htpasswd/htpasswd_nc
 +
            Require valid-user
 +
            ProxyPass http://localhost:9001/ retry=0 timeout=30
 +
            ProxyPassReverse http://localhost:9001/
 +
        </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:9001/socket.io/$1 [P,L]
 +
            ProxyPass http://localhost:9001/socket.io retry=0 timeout=30
 +
            ProxyPassReverse http://localhost:9001/socket.io
 +
        </Location>
 +
       
 +
        <Proxy *>
 +
            Options FollowSymLinks MultiViews
 +
            AllowOverride All
 +
            Order allow,deny
 +
            allow from all
 +
        </Proxy>
 +
    </VirtualHost>
 +
</IfModule>
  
 
</source>
 
</source>

Version vom 12. September 2018, 16:17 Uhr


minimal installation

apt install gzip git curl python libssl-dev pkg-config build-essential
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
git clone https://github.com/ether/etherpad-lite.git && cd etherpad-lite 

# zum testen, ansich nicht als root
bin/run.sh
# und dann im Browser http://127.0.0.1:9001/


mit apache ansprechen

  • /etc/apache2/sites-available/pad.domain.tld.conf
<VirtualHost *:80>
        ServerName  pad.domain.tld
        ServerAlias www.pad.domain.tld
        ServerAdmin webmaster@localhost
        Redirect permanent / https://pad.domain.tld/
</VirtualHost>


<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName pad.domain.tld
        ServerAlias www.pad.domain.tld

        # SSL configuration
        SSLEngine on
        # If you hold wildcard certificates for your domain the next two lines are not necessary.
        SSLCertificateFile /etc/ssl/private/nc/SSLCertificateFile.crt
        SSLCertificateKeyFile /etc/ssl/private/nc/SSLCertificateKeyFile.key
        # nc bof
        SSLCertificateChainFile /etc/ssl/private/nc/SSLCertificateChainFile.cer
        SetEnv nokeepalive ssl-unclean-shutdown
        # nc eof
        
        ProxyVia On
        ProxyRequests Off
        ProxyPreserveHost on    

        <Location />
            AuthType Basic
            AuthName "Welcome to the domain.org Etherpad"
            AuthUserFile /etc/htpasswd/htpasswd_nc
            Require valid-user
            ProxyPass http://localhost:9001/ retry=0 timeout=30
            ProxyPassReverse http://localhost:9001/
        </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:9001/socket.io/$1 [P,L]
            ProxyPass http://localhost:9001/socket.io retry=0 timeout=30
            ProxyPassReverse http://localhost:9001/socket.io
        </Location>
        
        <Proxy *>
            Options FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        </Proxy>
    </VirtualHost>
</IfModule>


a2enmod proxy proxy_http
systemctl restart apache2