首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将Etherpad安装到子目录中

将Etherpad安装到子目录中
EN

Stack Overflow用户
提问于 2013-05-26 19:33:07
回答 2查看 3.4K关注 0票数 4

我设法使用this Etherpad installation instruction启动并运行了Etherpad。

它在我的服务器上的http://localhost:9000/上运行,并通过反向代理和SSL传递到https://www.example.com/

这一切都运行得很好,但由于Etherpad不是我唯一的应用程序,我希望通过https://www.example.com/etherpad/调用它。我该如何管理它呢?

我尝试将ProxyPass命令更改为

代码语言:javascript
复制
ProxyPass /etherpad/ http://localhost:9000/
ProxyPassReverse /etherpad/ http://localhost:9000/

这使得它在/etherpad/目录下可用,但其中的所有资源仍然是从/ (根目录)提供的。在/etc/etherpad/etherpad.local.properties配置文件中,我没有找到任何相关设置。

我如何告诉Etherpad在一个子目录中?我不能使用另一个子域,因为我不会有SSL那里。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-06-12 18:33:48

我通过切换到Etherpad-Lite解决了这个问题。功能不完全相同,但对我来说已经足够了。

Etherpad-精简版使用相对目录,如../scripts/script.js,而不是绝对目录(Etherpad:/scripts/script.js)。

票数 5
EN

Stack Overflow用户

发布于 2013-05-27 01:21:20

See the Etherpad reverse proxy documentation

代码语言:javascript
复制
    <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>
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16758824

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档