...
Info | ||
---|---|---|
| ||
Before you read this chapter, make sure you read Connecting to Solr and understand the consequences of any changes. |
...
Instructions specific to Tomcat 7 and newer
Here's how you can:
- turn off the localhost filter in Tomcat
replace it with a RemoteAddrValve and allow an enumerated set of IP addresses or subnets (in the following example the 127.0.0.1, 123.123.123.123 IPs and the 111.222.333.* subnet would be allowed):
Code Block Change your server.xml or alternatively your context fragment (i.e. conf/Catalina/localhost/solr.xml) like this: <Context path="/solr" reloadable="true"> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="111127\.2220\.233.*, 1230\.1|123\.123\.123\.123, 127.0.0.1|111\.222\.233\.d+"/> <Parameter name="LocalHostRestrictionFilter.localhost" value="false" override="false" /> </Context>
Do not forget to include localhost (i.e. 127.0.0.1) in the allowed list, otherwise Discovery, OAI 2.0 and other things depending on Solr) won't work.
(see also DS-1260)
Instructions specific to Tomcat 6 and older
Please, note that the syntax of the "allow" attribute changed in Tomcat 7 to a single regular expression. In Tomcat 6 and older, it was a comma-separated list of regular expressions, therefore this worked in Tomcat 6, but does not work in Tomcat 7+:
Code Block |
---|
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="111.222.233.*, 123.123.123.123, 127.0.0.1"/> |
Accessing Solr
Solr cores
DSpace contains a so-called multicore installation of Solr. That means that there are multiple Solr indexes and configurations sharing one Solr codebase. If you're familiar with Apache HTTPD, it is analogous to multiple virtual hosts running on one Apache server (separate configuration and webpages), except that individual Solr cores are accessible via different URL (as opposed to virtualhost IP:port).
...