That parameter is within the <solrCloud> section, while you are talking about a standalone server. The context root of a webapp is not something you can configure within the webapp itself, each servlet engine / application server has its own way to do that.
The simplest (but definitely no "elegant") way is to rename the solr.war 
under your deployment directory; this works for sure with Jetty, Tomcat, 
JBoss, Weblogic, Websphere (most probably also with the others)
Best,
Andrea

On 02/06/2015 02:15 PM, Avanish Raju wrote:
I want to serve solr as a standalone server on a specific port, and need to
change the contextRoot from /solr to /
(I need to include some health checks on / which I will add to the solr.war)

I've tried changing my node1/solr/solr.xml's hostContext variable to
$(hostContext:) instead of $(hostContext:solr) but this didn't change
anything at http://localhost:8983/solr/. And if I go to
http://localhost:8983/, I get the following error:

Error 404 - Not Found. No context on this server matched or handled this
request. Contexts known to this server are: /solr --->
o.e.j.w.WebAppContext{/solr,file:/home/yaraju_gmail_com/solr-4.10.3/node1/solr-webapp/webapp/},/home/yaraju_gmail_com/solr-4.10.3/node1/webapps/solr.war

What is the right way to do this?

Thanks,
Avanish



Reply via email to