Is it possible to override jetty "contextPath" property when starting Solr 5 using command line arguments? I want something like
bin/solr -p 8983 -s "example/techproducts/solr" -a "-DcontextPath=/s"
So that the base url will be http://localhost:8983/s
To be precise, I want to override exactly contextPath property
Your question is about the context path of solr as jetty webapp.
Instead of
you want to access solr via
imho this is not possible without changing a configuration file.
Be aware that with zookeeper and solrCloud there is the parameter hostContext in solr.xml and you can use system properties in solr.xml like hostContext.
Without zookeeper but with changing
you will get what you want:
change from
to this:
Now you can start with