在 LAMP 服务器上使用 Jetty 的 Solr

编程入门 行业动态 更新时间:2024-10-21 15:31:20
本文介绍了在 LAMP 服务器上使用 Jetty 的 Solr - 管理页面访问问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有 Solr 和它的默认 Jetty,它带有安装在 Linux 服务器上的示例目录,该服务器具有 apache2 作为其 Web 服务器.

I have Solr with its default Jetty that came with example directory installed on Linux server which has apache2 as its web server.

现在,在同一个私有 LAN 中,当我打开浏览器并输入 http://:8983/solr我做端口转发否则它不起作用.我不确定可能是什么问题?请注意,此安装是在用于生产部署的托管环境中的远程服务器上完成的,我是初学者 wrt 部署的东西.

Now, within the same private LAN, when I open a browser and type in http://<ip-address>:8983/solr works ONLY when I do port forwarding otherwise it doesn't work. I am not sure what could be the problem? Please note this installation has been done on a remote server in a hosting environment for production deployment and I am a beginner wrt deployment stuff.

推荐答案

您可以在启动期间使用 jetty.host 参数来允许直接访问 Jetty.

You can use the jetty.host parameter during startup to allow direct access to Jetty.

java 命令的 -D 选项可以与以下语法一起使用:

The -D option of the java command can be used with the followin syntax:

java -Djetty.host=0.0.0.0 -jar start.jar

这样可以从所有主机访问 Jetty.

In this way Jetty can be reached from all the hosts.

然而,恕我直言,这不是理想的设置.我更喜欢将 Jetty 设置为仅在 localhost 上侦听,使用另一台侦听端口 80 的前端服务器实现客户端.如果您想在另一台服务器上实现前端,您可以使用 iptables 来限制传入连接,将所有内容丢弃在 8983 端口上如果 IP 与您的前端服务器不同.

However this is not the ideal setup IMHO. I prefere to setup Jetty to listen only on localhost, implementing the client with another frontend server which listen on port 80. If you want to implement the frontend on another server you can use iptables to limit the incoming connection, dropping everything on the 8983 port if the IP is different from the one of your frontend server.

此图描绘了我对 LAMP 堆栈(包括 SOLR)的首选设置:

This image depicts my preferred setup for a LAMP stack includin SOLR:

这篇关于在 LAMP 服务器上使用 Jetty 的 Solr - 管理页面访问问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-19 23:57:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/972766.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:器上   LAMP   Solr   Jetty

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!