How to change base path of Solr example?

7,221

Solution 1

I think I figured it out myself. What I did was, inside the example directory, rename

webapps/solr.war

to

webapps/foobar.war

Also, I changed a line in solr/conf/scripts.conf to

webapp_name=foobar

Solution 2

Seems a little different in 2014 with Solr 4.10:

From the "example" directory or your equivalent:

  1. edit contexts/solr-jetty-context.xml <Set name="contextPath"><SystemProperty name="hostContext" default="/foobar"/></Set>
  2. edit solr/collectionName/conf/scripts.conf : change webapp_name=foobar
  3. java -jar start.jar

I'm not sure where the webapp_name parameter is used but it seems reasonable to keep this.

Solution 3

If you are running Solr with Jetty, you can change it in webdefault.xml. Detailed instructions here

Share:
7,221

Related videos on Youtube

arussell84
Author by

arussell84

Updated on September 18, 2022

Comments

  • arussell84
    arussell84 almost 2 years

    I've followed the Solr tutorial, but the URL they make you use is:

    http://localhost:8983/solr/ 
    

    What is the most simple way to change this URL to:

    http://localhost:8983/foobar/