Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.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 Web服务器ReverseProxy为Apache Solr管理面板提供服务_Apache_Solr_Debian_Jetty_Reverse Proxy - Fatal编程技术网

Apache Web服务器ReverseProxy为Apache Solr管理面板提供服务

Apache Web服务器ReverseProxy为Apache Solr管理面板提供服务,apache,solr,debian,jetty,reverse-proxy,Apache,Solr,Debian,Jetty,Reverse Proxy,我正在尝试在远程服务器上运行ApacheSolr服务(在其EmdedJetty服务器上)。管理员向我提供了以下信息: DNS:my.server.com IP:xxx.xxx.xxx 服务器操作系统:3.16.0-4-amd64#1 SMP Debian 3.16.36-1+deb8u1(2016-09-03)x86_64 GNU/Linux 只有端口80可访问。在服务器上,我们希望部署ApacheSolr和一个使用Solr作为搜索引擎的微服务。我想使用ApacheWebServer将HTTP请

我正在尝试在远程服务器上运行ApacheSolr服务(在其EmdedJetty服务器上)。管理员向我提供了以下信息:

DNS:my.server.com

IP:xxx.xxx.xxx

服务器操作系统:3.16.0-4-amd64#1 SMP Debian 3.16.36-1+deb8u1(2016-09-03)x86_64 GNU/Linux

只有端口80可访问。在服务器上,我们希望部署ApacheSolr和一个使用Solr作为搜索引擎的微服务。我想使用ApacheWebServer将HTTP请求转发到Solr管理UI和微服务UI,但它似乎不起作用,我使用的是Apache服务器版本:Apache/2.4.10(Debian) 服务器构建时间:2016年9月15日20:44:43

我安装了Apache并启动了服务器,目前一切正常。我可以通过Apache在浏览器中输入DNS访问管理视图

我启用了以下几个模块:

  • a2enmod代理
  • a2enmod代理服务器
  • a2enmod代理_ajp
  • a2enmod重写
  • a2enmod放气
  • a2enmod标题
  • a2enmod代理_平衡器
  • a2enmod代理连接
  • a2enmod proxy_html
然后我尝试在/etc/apache2/sites available/myconf.conf下配置虚拟主机:

 <VirtualHost *:80>
  DocumentRoot /var/www/html
  ErrorLog /var/log/apache2/error.log
  CustomLog /var/log/apache2/access.log combined

  ProxyPass        /solr http://my.server.com:8983 retry=0 timeout=5
  ProxyPassReverse /solr http://my.server.com:8983
  ProxyPass        /microservice http://my.server.com:6868 retry=0 timeout=5
  ProxyPassReverse /microservice http://my.server.com:6868
  LogLevel debug

</VirtualHost>
但这并没有改变什么。我还必须首先安装:

apt-get install policycoreutils
使此选项可用。solr服务似乎还可以:

solr status

Found 1 Solr nodes:

Solr process 14082 running on port 8983
{
  "solr_home":"/etc/apache-solr/solr-6.2.0/server/solr",
  "version":"6.2.0 764d0f19151dbff6f5fcd9fc4b2682cf934590c5 - mike - 2016-08-20 05:41:37",
  "startTime":"2016-10-07T12:02:05.300Z",
  "uptime":"0 days, 1 hours, 29 minutes, 55 seconds",
  "memory":"29.7 MB (%6.1) of 490.7 MB"}
Apache日志一直在说:

The timeout specified has expired: AH00957: HTTP: attempt to connect to xxx.xxx.xxx:8983 (my.server.com) failed
AH00959: ap_proxy_connect_backend disabling worker for (my.server.com) for 0s
AH01114: HTTP: failed to make connection to backend: my.server.com
没有我的超时设置,所有事情都保持不变,但我需要很长时间才能得到503错误

有什么提示吗?经过一天的挣扎,我很沮丧。。。我只想完成这项任务


提前谢谢

结果是我需要在URL上附加一个斜杠:

  ProxyPass        /solr/ http://my.server.com:8983/ retry=0 timeout=5
  ProxyPassReverse /solr/ http://my.server.com:8983/
  ProxyPass        /microservice/ http://my.server.com:6868/ retry=0 timeout=5
  ProxyPassReverse /microservice/ http://my.server.com:6868/

尝试使用后端ip而不是名称,以防您的名称解析不符合您的想法。
  ProxyPass        /solr/ http://my.server.com:8983/ retry=0 timeout=5
  ProxyPassReverse /solr/ http://my.server.com:8983/
  ProxyPass        /microservice/ http://my.server.com:6868/ retry=0 timeout=5
  ProxyPassReverse /microservice/ http://my.server.com:6868/