什么是OrientDB的DocumentRoot?或者,OrientDB的Web文件在哪里?

时间:2019-02-15 19:13:15

标签: apache https orientdb

我正在尝试通过反向代理访问OrientDB的REST API。也就是说,我有一个域orientdb.mydomain.com,该域转发到服务器所在的localhost:2480。我正在不安全的网站上进行此操作,因此我可以访问http://orientdb.mydomain.com,它会打开Studio网站:

http://orientdb.mydomain.com/studio/index.html

但是,这不适用于https。我收到404错误(“在此服务器上找不到请求的URL /studio/index.html”)

我觉得我没有使用正确的文档根目录,或者OrientDB有一些有趣的地方,它以另一种方式生成了上面的路径。我实际上在任何地方都找不到此/ studio目录。

这来自ssl.conf文件中的virtualhost设置。

<VirtualHost _default_:443>                                                                                    
DocumentRoot "/opt/orientdb-3.0.6/www"
<Directory "/opt/orientdb-3.0.6/www">

        Require all granted
    </Directory>

ServerName orientdb.mydomain.com
#more stuff
</VirtualHost>

顺便说一句,我本来在Directory标记中具有以下选项,但它给出了禁止的错误。我将其更改为“要求全部授予”,并且现在显示“未找到”-所以我认为我正在进步。

    AllowOverride All                                                                                                                                   
    Order allow,deny    

总而言之,是否可以通过这种方式访问​​OrientDB服务器?如果可以,我应该把什么作为DocumentRoot等放置?

2 个答案:

答案 0 :(得分:0)

我认为您无法做到。 OrientDB嵌入了自己的HTTP服务器,因此唯一的方法就是使用反向代理配置。

您可以在https中公开您的Web服务器(我猜是Apache HTTP),并在其中终止“ s”,代理到orientdb HTTP端口(2480)。

答案 1 :(得分:0)

事实证明这不是OrientDB问题,而是代理问题。我曾使用虚拟主机在端口80上设置代理,但对端口443却没有做同样的事情。将这些设置添加到orientdb.mydomain.com上的443虚拟主机后,便能够访问Studio和HTTP通过HTTPS的REST API。

ProxyPass / http://127.0.0.1:2480/
ProxyPassReverse / http://127.0.0.1:2480/

<Proxy *>
       Require all granted
</Proxy>