title: Can't get Solr 4.8 working with Tomcat 7 and Ubuntu 12.04
body: <p>I'm trying to get Solr 4.8 running under Tomcat 7 on a Ubuntu 12.04 server, that will be accessed from a Rails 4 app using the <code>sunspot_rails</code> gem.</p>
  
  <p>For now I'm just testing with the multicore example from Solr 4.8 to verify that it's working with the default configuration.</p>
  
  <p>Tomcat is running fine (<code>curl localhost:8080</code> returns the "It's working"-page), and I can't see any errors in the Tomcat or Solr logs. But <code>curl localhost:8080/solr</code> doesn't return anything, and <code>curl localhost:8080/solr/update</code> returns <code>The requested resource (/solr/update) is not available.</code>. <em>(I'm using curl on localhost since I'm unable to access the Tomcat 7 admin or Solr Admin remotely).</em></p>
  
  <p>I've copied the <code>solr.war</code> file from the example over to multicore and also all the jar files and log4j.properties into tomcat7/lib (basically just followed the instructions here but for 4.8 of course <a href="http://gagannaidu.blogspot.no/2014/02/apache-solr-461-tomcat7-setup-on-ubuntu.html" rel="nofollow">http://gagannaidu.blogspot.no/2014/02/apache-solr-461-tomcat7-setup-on-ubuntu.html</a>):</p>
  
  <pre><code>sudo cp /usr/share/solr/example/webapps/solr.war /usr/share/solr/example/multicore/solr.war
  
  sudo cp -r solr/example/lib/ext/* /usr/share/tomcat7/lib
  
  sudo cp -r solr/example/resources/log4j.properties /usr/share/tomcat7/lib
  </code></pre>
  
  <p>I've also set the owner of the multicore folder to tomcat7:</p>
  
  <pre><code>sudo chown -R tomcat7 /usr/share/solr/example/multicore
  </code></pre>
  
  <p>Here are my config files:</p>
  
  <p><strong>solr.xml</strong> in /var/lib/tomcat7/conf/Catalina/localhost:</p>
  
  <pre><code>&lt;Context docBase="/usr/share/solr/example/multicore/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true"&gt;
    &lt;Environment name="solr/home" type="java.lang.String" value="/usr/share/solr/example/multicore" override="true" /&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p><strong>solr.xml</strong> in /usr/share/solr/example/multicore:</p>
  
  <pre><code>&lt;solr persistent="false"&gt;
    &lt;cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}"&gt;
      &lt;core name="core0" instanceDir="core0" /&gt;
      &lt;core name="core1" instanceDir="core1" /&gt;
  
      &lt;shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory"&gt;
        &lt;str name="urlScheme"&gt;${urlScheme:}&lt;/str&gt;
      &lt;/shardHandlerFactory&gt;
    &lt;/cores&gt;
  &lt;/solr&gt;
  </code></pre>
  
  <p>I've tried changing the hostPort to <code>"${jetty.port:8080}"</code> or just <code>"8080"</code> but that doesn't seem to help.</p>
  
  <p>Anyone know what I can do to get this working?</p>