Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup Apache2 as Reverse Proxy for solr. Apache and Solr are on the same machine. Apache is serving other stuff as regular web server, too.

solsearch config file in /etc/apache2/config.d/

# Proxy specific settings
ProxyRequests Off
ProxyPreserveHost Off

<Proxy *>
    AddDefaultCharset off
    Order deny,allow
    Allow from all

ProxyPass /solrsearch http://localhost:8983/solr/collection1/browse
ProxyPassReverse /solrsearch http://localhost:8983/solr/collection1/browse

Now trying http://localhost/solsearch gives me the first page of http://localhost:8983/solr/collection1/browse, but with broken layout (like css missing).

Result: error.log of apache:

File does not exist: /var/www/solr, referer: []
share|improve this question
What location are the css files etc trying to load from? – Shane Madden Oct 18 '13 at 20:06
First make sure you understand the basics: – Michael Martinez Oct 19 '13 at 0:37
@Shane Madden: It should get all files from [localhost:8983/slor], but then it suddenly looks for them in the normal www folder... – Steven Oct 19 '13 at 10:23

The links from the HTML content page for the CSS and other files are probably absolute paths - so they're linked to /solr/path/to/css instead of path/to/css.

You should be able to solve this by adding another ProxyPass:

ProxyPass /solrsearch http://localhost:8983/solr/collection1/browse
ProxyPassReverse /solrsearch http://localhost:8983/solr/collection1/browse
ProxyPass /solr http://localhost:8983/solr

But, you should be careful that that's not exposing more content than you want exposed if this is a publicly available server.

share|improve this answer
That did the trick! Thank you very much!!! – Steven Oct 19 '13 at 19:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.