Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access Solr from an external IP address?

I have Solr running on my server on localhost in the Jetty container.

This seems like an obvious question, but how do I access the web interface from outside the server itself, like from an external IP address? Obviously, authentication will be important as part of any solution.

I am also running Apache2 on the server, if that is a good solution. I'm surprised I can't find anything about this.

like image 402
mlissner Avatar asked Oct 25 '25 23:10

mlissner


2 Answers

I finally stumbled upon an answer to this. I don't really need persistent access to the Solr admin panel, so I can easily access it using local port forwarding in SSH.

All I had to do was run the following from a terminal on my local machine:

ssh -L 8983:localhost:8983 mlissner@IP-OF-SERVER-RUNNING-SOLR -N

And then open my browser to http://localhost:8983/solr/

Much easier than setting up an Apache config, doing proxies, and whatever else.

like image 59
mlissner Avatar answered Oct 28 '25 23:10

mlissner


It depends on your Jetty ContextPath. For example:

    ....
    WebAppContext explorerWebapp = new WebAppContext();
    explorerWebapp.setContextPath("/solr");
    ....

and then just navigate to your index:

    http://localhost:PORT/solr/
like image 38
RoiG Avatar answered Oct 28 '25 23:10

RoiG



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!