I solved the issue by switching to Etherpad-Lite. Not quite the same functionality, but enough for me.
Etherpad-Lite uses relative directories like ../scripts/script.js
instead of absolute directories (Etherpad: /scripts/script.js
).
Question
I managed to get Etherpad up and running using this Etherpad installation instruction.
It runs at http://localhost:9000/
on my server and is delivered on Apache via Reverse Proxy and SSL to https://www.example.com/
.
This is all running fine, but as Etherpad is not my only application I want it to be called via https://www.example.com/etherpad/
. How can I manage this?
I tried to change the ProxyPass
commands to
ProxyPass /etherpad/ http://localhost:9000/
ProxyPassReverse /etherpad/ http://localhost:9000/
which made it available at /etherpad/
directory, but all ressources within it are still delivered from /
(root directory). Within the /etc/etherpad/etherpad.local.properties
config file I did not find any relevant setting.
How can I tell Etherpad to live within a subdirectory? I cannot use another subdomain as I would not have SSL there.
Solution
I solved the issue by switching to Etherpad-Lite. Not quite the same functionality, but enough for me.
Etherpad-Lite uses relative directories like ../scripts/script.js
instead of absolute directories (Etherpad: /scripts/script.js
).
OTHER TIPS
See the Etherpad reverse proxy documentation
<VirtualHost *:80>
ServerAdmin support@example.org
ServerName etherpad.example.org
ServerSignature Off
CustomLog /var/log/apache2/etherpad_access.log combined
ErrorLog /var/log/apache2/etherpad_error.log
ErrorLog syslog:local2
<IfModule mod_proxy.c>
# the following allows "nice" urls such as https://etherpad.example.org/padname
# But, some users reported issues with this
RewriteEngine On
RewriteRule /p/*$ https://etherpad.example.org/ [NC,L]
RewriteCond %{REQUEST_URI} !^/locales/
RewriteCond %{REQUEST_URI} !^/locales.json
RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{REQUEST_URI} !^/p/
RewriteCond %{REQUEST_URI} !^/static/
RewriteCond %{REQUEST_URI} !^/pluginfw/
RewriteCond %{REQUEST_URI} !^/javascripts/
RewriteCond %{REQUEST_URI} !^/socket.io/
RewriteCond %{REQUEST_URI} !^/ep/
RewriteCond %{REQUEST_URI} !^/minified/
RewriteCond %{REQUEST_URI} !^/api/
RewriteCond %{REQUEST_URI} !^/ro/
RewriteCond %{REQUEST_URI} !^/error/
RewriteCond %{REQUEST_URI} !^/jserror
RewriteCond %{REQUEST_URI} !/favicon.ico
RewriteCond %{REQUEST_URI} !/robots.txt
RewriteRule ^/+(.+)$ https://etherpad.example.org/p/$1 [L]
ProxyVia On
ProxyRequests Off
ProxyPass / http://etherpad.internal.example.org:9001/
ProxyPassReverse / http://etherpad.internal.example.org:9001/
ProxyPreserveHost on
<Proxy *>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Proxy>
</IfModule>
</VirtualHost>