2013-05-26 7 views
4

Мне удалось запустить Etherpad с помощью this Etherpad installation instruction.Установите Etherpad в подкаталог

Он работает на http://localhost:9000/ на моем сервере и доставляется на Apache через обратный прокси и SSL до https://www.example.com/.

Все работает нормально, но поскольку Etherpad не является моим единственным приложением, я хочу, чтобы он был вызван через https://www.example.com/etherpad/. Как я могу это сделать?

Я попытался изменить ProxyPass команды

ProxyPass /etherpad/ http://localhost:9000/ 
ProxyPassReverse /etherpad/ http://localhost:9000/ 

, который сделал его доступным в /etherpad/ каталоге, но все Ressources внутри него по-прежнему доставляются из / (корневого каталога). В файле конфигурации /etc/etherpad/etherpad.local.properties я не нашел подходящей настройки.

Как я могу сказать, что Etherpad живет в подкаталоге? Я не могу использовать другой поддомен, так как у меня не было бы SSL.

ответ

4

Я решил проблему путем перехода на Etherpad-Lite. Не совсем такая же функциональность, но достаточно для меня.

Etherpad-Lite использует относительные каталоги, такие как ../scripts/script.js вместо абсолютных каталогов (Etherpad: /scripts/script.js).

1

See the Etherpad reverse proxy documentation

<VirtualHost *:80> 
     ServerAdmin [email protected] 
     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> 
+0

Мне не удалось получить эту работу, также она не переносит все данные в подкаталоги. Я переключился на Etherpad-Lite, который использует относительные пути. – arnep

Смежные вопросы