title: Apache: Proxy 2 URLS to different port on same domain
body: <p>I have jenkins and solr running on machine. (8080, 8081 ports)</p>
  
  <p>I would like a configuration to do this proxy </p>
  
  <p>www.example.com/jenkins => localhost:8080/jenkins</p>
  
  <p>AND</p>
  
  <p>www.example.com/solr => localhost:8081/solr</p>
  
  <p>It is not working. Only the jenkins works. Solr does not.</p>
  
  <pre><code>ProxyPass         /solr  http://localhost:8081/solr nocanon
  ProxyPassReverse  /solr  http://localhost:8081/solr
  </code></pre>
  
  <p>Result of <code>apachectl -S</code></p>
  
  <pre><code>VirtualHost configuration:
  
  *:80                   is a NameVirtualHost
           default server example.com/jenkins (/etc/apache2/sites-enabled/jenkins.conf:1)
           port 80 namevhost example.com/jenkins (/etc/apache2/sites-enabled/jenkins.conf:1)
           port 80 namevhost example.com/solr (/etc/apache2/sites-enabled/solr.conf:1)
  .
  </code></pre>
  
  <p>solr.conf file </p>
  
  <pre><code>&lt;Virtualhost *:80&gt; 
  ServerName example.com/solr 
  DocumentRoot /var/www/solr/public_html 
  ProxyRequests Off 
  ProxyPreserveHost On 
  AllowEncodedSlashes NoDecode 
  
  &lt;Proxy http://localhost:8081/*&gt;
   Order deny,allow Allow from all 
  &lt;/Proxy&gt; 
  
  ProxyPass /solr http://localhost:8081/solr nocanon 
  ProxyPassReverse /solr http://localhost:8081/solr 
  
  &lt;/Virtualhost&gt;
  </code></pre>