Deploy Solr at the same port as tomcat

We have our web application hosted on the tomcat server on port 8080 (UNIX server).

We want to implement SOLR search in our project. SOLR suggests we should no more deploy SOLR as a web application. Please refer the link below.

Default SOLR installation (uses jetty, I think?) deploys it on any port we specify.

We don't want to open any ports other than 8080 on our server because most of the users we target have all the ports blocked except the default port.

Is there a way to host SOLR without deploying it in tomcat and still host it as?


The best bet is to use proxy, for example nginx. Here is a sample how http block of nginx configuration may look for this case:

http {  
    upstream tomcat {
      server localhost:8081;

    upstream solr {
      server localhost:8082;

    server {
        listen       *:8080;
        location / {
            proxy_pass http://tomcat;

        location /solr/ {
            proxy_pass http://solr;

Solr is still a web app. They are suggesting that not to use it in another servlet container as its not been recommended and tested by them.

They are giving a fully tested system and don't want others(developers) to invest time in testing it with other containers.

I have used solr 3.4 version and deployed it in tomcat server on port 8080. My application is deployed in another tomcat at 8080 port and is on another machine.

So there in not ambiguity about the port as both tomcats are on the different servers.

I have created the solr war and deployed the same in tomcat. and only 8080 port of that server is made open and been access by our application only.

I am not sure about the solr version 5 ...i.e. whether that can be deployed in other container other than jetty...but I think it can be deployed in need to try the same...

Other thing is that dont deply application war and solr war in the same container or in a single container. The reason is if one of the application goes down everything will be down.

Like if solr goes down then the application may go down, which is not a good for the application.

Need Your Help

Mongo aggregate and count over n fields

mongodb aggregation-framework

Im having trouble understanding MongoDB's Aggregation framework. Basically my JSON looks like this:

trying to send a mmaped file in chat using sockets in c

c sockets unix mmap

my assignment was to build a chat server and client with the beej's guide examples so the client can upload a file to the server.