Apache2 将apache反向代理从localhost安装到domain.com/etherpad

Apache2 将apache反向代理从localhost安装到domain.com/etherpad,apache2,reverse-proxy,etherpad,Apache2,Reverse Proxy,Etherpad,晚上好, 我正在尝试设置apache2反向代理 (以下) 对于etherpad lite (以下,nginx部分除外)。 我使用http->ssl重定向。由于我使用letsencrypt,我只能访问domain.com而不能访问etherpad.domain.com(至少firefox不允许我访问,我希望避免在每次添加新站点时更改该证书)。所以我想访问我的etherpad,就像访问我的其他网站一样:domain.com/etherpad。然而,我总是得到一个404试图进入该网站。查看一个工作示例

晚上好,
我正在尝试设置apache2反向代理
(以下)
对于etherpad lite
(以下,nginx部分除外)。
我使用http->ssl重定向。由于我使用letsencrypt,我只能访问domain.com而不能访问etherpad.domain.com(至少firefox不允许我访问,我希望避免在每次添加新站点时更改该证书)。所以我想访问我的etherpad,就像访问我的其他网站一样:domain.com/etherpad。然而,我总是得到一个404试图进入该网站。查看一个工作示例,在我的nextcloud.conf文件中有一行代码是:
别名/nextcloud/local/path/to/nextcloud
然而etherpad反向代理虚拟主机文件看起来完全不同,关键区别在于etherpad没有本地文件夹,只有一个mysql数据库。(如果这是错误的,请纠正我)
因此,我尝试将ssl示例从第二个链接更改为以下链接,但它不起作用。请理解,我更改了域名和一些内部路径,但“apache2ctl configtest”成功,并且服务正在正常运行

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName randomisedDomain.com/etherpad

    # SSL configuration
    SSLEngine on
    # If you hold wildcard certificates for your domain the next two lines are not necessary.
    SSLCertificateFile "/working/path/to/fullchain.pem"
    SSLCertificateKeyFile "/working/path/to/privkey.pem"

    ProxyVia On
    ProxyRequests Off
    ProxyPreserveHost on

    <Location />
        AuthType Basic
        AuthName "Welcome to the randomisedDomain.com Etherpad"
        AuthUserFile /working/path/to/etherpad.passwd
        #AuthGroupFile /path/to/svn.group
        Require user etherpad
        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>

ServerName randomisedDomain.com/etherpad
#SSL配置
斯伦金安
#如果您持有域的通配符证书,则不需要下两行。
SSLCertificateFile“/working/path/to/fullchain.pem”
SSLCertificateKeyFile“/working/path/to/privkey.pem”
ProxyVia On
代理请求关闭
代理主机
AuthType Basic
AuthName“欢迎使用randomisedDomain.com以太板”
AuthUserFile/working/path/to/etherpad.passwd
#AuthGroupFile/path/to/svn.group
需要用户以太板
ProxyPasshttp://localhost:9001/ 重试=0超时=30
ProxyPassReversehttp://localhost:9001/
#这是通过代理处理websocket传输所必需的,因为
#etherpad不使用特定的子文件夹,例如/ws/来处理此类流量。
#取自https://github.com/ether/etherpad-lite/issues/2318#issuecomment-63548542
#感谢博冈德森的语义学
重新启动发动机
RewriteCond%{QUERY_STRING}transport=websocket[NC]
重写规则/(*)ws://localhost:9001/socket.io/$1[P,L]
ProxyPasshttp://localhost:9001/socket.io 重试=0超时=30
ProxyPassReversehttp://localhost:9001/socket.io
选项如下符号链接多视图
允许超越所有
命令允许,拒绝
通融

非常感谢您为将本地主机域重新路由到randomisedodomain.com/etherpad提供的任何帮助

致以最诚挚的问候
地图绘制者