Etherpad lite: Unterschied zwischen den Versionen

Aus Vosp.info
Wechseln zu:Navigation, Suche
Zeile 17: Zeile 17:
 
</source>
 
</source>
  
 +
== npm ... extensions ==
 +
<source lang=bash>
 +
npm init
 +
npm i ep_list_pads
 +
npm i ep_historicalsearch
 +
npm i ep_fileupload
 +
npm i ep_public_view
 +
</source>
  
 
== mit apache ansprechen ==
 
== mit apache ansprechen ==

Version vom 12. September 2018, 16:27 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/

npm ... extensions

npm init
npm i ep_list_pads
npm i ep_historicalsearch
npm i ep_fileupload
npm i ep_public_view

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