Solr with Jetty on LAMP server - Admin page access issue

纵然是瞬间 提交于 2019-12-25 02:00:25

问题


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

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.


回答1:


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

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

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

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

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.

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



来源:https://stackoverflow.com/questions/21391330/solr-with-jetty-on-lamp-server-admin-page-access-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!