4

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.

mlissner
  • 17,359
  • 18
  • 106
  • 169

2 Answers2

8

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.

mlissner
  • 17,359
  • 18
  • 106
  • 169
  • 3
    Some people spent time giving you answers based on what you asked and you didn't even upvote them. Then you've added your own answer based on what you know but you didn't tell in your question. Next time youshould tell something more and let us help you. Bye! – javanna Feb 06 '12 at 21:20
  • 1
    I'm not saying you already knew, and your own answer is of course welcome. That's the solution you were looking for, great! But you asked for a kind of robust solution mentioning apache and authentication, while the solution you chose doesn't have anything to do with that. Therefore you were the only one who could provide an helpful answer, and that's not pleasant for other people. At least an upvote for the effort could have been a good sign. I hope you understand what I mean, it isn't a matter of score. – javanna Feb 08 '12 at 19:56
  • BTW I deleted my answer because I hate not accepted answers without votes, no hard feelings! :) – javanna Feb 08 '12 at 20:01
  • This allowed me to access the Solr Admin UI (GUI; http version) on a SSL-only remote VPS, via SSH from my home computer! (Otherwise, only command-line access on server / VPS side.) – Victoria Stuart Aug 25 '22 at 02:34
1

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/
RoiG
  • 478
  • 3
  • 11
  • I can't test this right now, but is this a secure way of providing access? Seems like opening a port directly to Jetty would be risky. – mlissner Jan 18 '12 at 20:53
  • Using localhost you access just locally. You can directly open the jetty port, but better to access through a proxy from outside your machine/network. – javanna Jan 18 '12 at 21:11