...
Wiki Markup |
---|
By default, the DSpace Solr server is configured to listen only on localhost, port 8080 (unless you specified another port in Tomcat configuration and the {{\[dspace\]/config/modules/discovery.cfg}} config file). That means that you cannot connect from another machine to the dspace server port 8080 and request a Solr URL - you'll get a HTTP 403 error. This configuration was done for security considerations - Solr index contains some data that is not accessible via public DSpace interfaces and some of the data might be sensitive. |
Bypassing localhost restriction temporarily
While you could make Solr publicly accessible by changing this default configuration (if you want to do so, search for LocalHostRestrictionFilter; see also DS-1260), this is not recommended, because Solr indexes may contain some data you might consider private. Instead, use one of following simple means to bypass this restriction temporarily. All of them will make Solr accessible only to the machine you're connecting from for as long as the connection is open.
...
Note about Putty as SOCKS proxy - while it can be configured, it raises a security exception when Solr is accessed. If you figure this out, please add this method here.
Bypassing localhost restriction permanently
Info | ||
---|---|---|
| ||
Before you read this chapter, make sure you read Connecting to Solr and understand the consequences of any changes. |
Tomcat-specific instructions
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
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.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="111.222.233.*, 123.123.123.123, 127.0.0.1"/> <Parameter name="LocalHostRestrictionFilter.localhost" value="false" override="false" /> </Context>
(see also DS-1260)
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).
...