I have <strong>Solr with its default Jetty</strong> that came with example directory <strong>installed on Linux</strong> server which has <strong>apache2 as its web server</strong>.
Now, within the same private LAN, when I open a browser and type in
http://<ip-address>:8983/solr works <strong>ONLY</strong> when I do port forwarding <strong>otherwise it doesn't work</strong>. 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.
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:
<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/OOOO3.png" data-original="https://i.stack.imgur.com/OOOO3.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />