Configuring Solr to use a proxy directly (i.e. if you use sharded searches, and you need Solr to see the web via a proxy) is not possible. However, you can configure the proxy in the JVM, and conveniently, Solr uses the SystemDefaultHttpClient when fetching data, which will respect those settings.

So, if you're using Jetty, it's as simple as this:

java -jar start.jar \
    -Dhttp.proxyHost=my.proxy.url.or.ip \
    -Dhttp.proxyPort=1234

Don't include the protocol if you use a URL.

  • No labels