Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 将Etherpad安装到子目录中_Apache_Ssl_Reverse Proxy_Etherpad - Fatal编程技术网

Apache 将Etherpad安装到子目录中

Apache 将Etherpad安装到子目录中,apache,ssl,reverse-proxy,etherpad,Apache,Ssl,Reverse Proxy,Etherpad,我设法让Etherpad启动并使用它运行 它在http://localhost:9000/在我的服务器上,通过反向代理和SSL在Apache上传递到https://www.example.com/ 这一切运行正常,但由于Etherpad不是我唯一的应用程序,我希望通过https://www.example.com/etherpad/。我该怎么办 我试图将ProxyPass命令更改为 ProxyPass /etherpad/ http://localhost:9000/ ProxyPassReve

我设法让Etherpad启动并使用它运行

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

这一切运行正常,但由于Etherpad不是我唯一的应用程序,我希望通过
https://www.example.com/etherpad/
。我该怎么办

我试图将
ProxyPass
命令更改为

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

如何让Etherpad生活在子目录中?我不能使用另一个子域,因为那里没有SSL。


服务器管理员support@example.org
ServerName etherpad.example.org
服务器签名关闭
CustomLog/var/log/apache2/etherpad_access.log组合
ErrorLog/var/log/apache2/etherpad_error.log
ErrorLog syslog:local2
#下面允许使用“漂亮”的URL,例如https://etherpad.example.org/padname
#但是,一些用户报告了这方面的问题
重新启动发动机
重写规则/p/*$https://etherpad.example.org/ [北卡罗来纳州,L]
重写cond%{REQUEST_URI}^/地区/
重写cond%{REQUEST_URI}^/locales.json
重写cond%{REQUEST_URI}^/管理
重写cond%{REQUEST_URI}^/p/
重写cond%{REQUEST_URI}^/静止的/
重写cond%{REQUEST_URI}^/pluginfw/
重写cond%{REQUEST_URI}^/Java脚本/
重写cond%{REQUEST_URI}^/socket.io/
重写cond%{REQUEST_URI}^/ep/
重写cond%{REQUEST_URI}^/缩小/
重写cond%{REQUEST_URI}^/原料药/
重写cond%{REQUEST_URI}^/反渗透/
重写cond%{REQUEST_URI}^/错误/
重写cond%{REQUEST_URI}^/jserror
重写cond%{REQUEST_URI}/图标文件
重写cond%{REQUEST_URI}/robots.txt
重写规则^/+(.+)$https://etherpad.example.org/p/$1[L]
ProxyVia On
代理请求关闭
ProxyPass/http://etherpad.internal.example.org:9001/
ProxyPassReverse/http://etherpad.internal.example.org:9001/
代理主机
选项如下符号链接多视图
允许超越所有
命令允许,拒绝
通融

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


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

我没有设法让它工作,而且它也没有真正将所有数据移动到子目录中。我切换到使用相对路径的Etherpad Lite。
    <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>