Solr reverse proxy behind Apache web server

I have an existing Apache web server (2.2.15) configured with various security information (only https / authentication / authorization / etc.). I can rely on this server to handle access requirements for my solr installation.

I have a basic example of a solr instance and it runs on a separate machine. (Solr 4.8.0)

I want to be able to redirect the URL https://myserver/department/team/search/....to a Solr instance running on another (private) machinehttp://solrserver:8983/

I configured Apache server with:

ProxyPass /department/team/search/ http://solserver:8983/
ProxyPassReverse /department/team/search/ http://solserver:8983/

I have some success in this, https is being processed, authentication / access is being processed, etc.

When I look at the URL, it loads the main solr page, but the page inside it has the following meanings:

  <script type="text/javascript">

  var app_config = {};

  app_config.solr_path = '\/solr';
  app_config.core_admin_path = '\/admin\/cores';

  </script>

( ) JavaScript, :

 https://myserver/solr/admin/cores?wt=json&indexInfo=false&_=1399485239437

 https://myserver/department/team/search/solr/admin/cores?wt=json&indexInfo=false&_=1399485239437

, (app_config.solr_path app_config.core_admin_path), , ......

:

  • , app_config.solr_path app_config.core_admin_path?
  • , , ? ( /, - apache, ).
+4
2

.

<VirtualHost *:8080>
    ServerName solr.xyz.com.br  
    ProxyPreserveHost on
    ProxyRequests off   

    RewriteEngine On
    RewriteRule ^\/solr(.*)$ $1 [L,R]

    ProxyPass / ajp://localhost:8009/solr/
    ProxyPassReverse / ajp://localhost:8009/solr/
</VirtualHost>
+2

, , Apache NGINX, . , , nginx.conf:

location /solr/select {
  proxy_pass http://YourSolrServer:8983/solr/select;
  proxy_buffering on;
}

/solr/select (,/department/team/search/). , .

: https://groups.google.com/forum/#!topic/ajax-solr/pLtYfm83I98

0

Source: https://habr.com/ru/post/1539639/


All Articles