Apache:将2个URL代理到同一域上的不同端口

Apache:将2个URL代理到同一域上的不同端口,apache,jenkins,solr,routing,Apache,Jenkins,Solr,Routing,我让詹金斯和索尔在机器上运行。(808081端口) 我想要一个配置来执行此代理 www.example.com/jenkins=>localhost:8080/jenkins 及 www.example.com/solr=>localhost:8081/solr 它不起作用。只有詹金斯一家有效。索尔没有 ProxyPass /solr http://localhost:8081/solr nocanon ProxyPassReverse /solr http://local

我让詹金斯和索尔在机器上运行。(808081端口)

我想要一个配置来执行此代理

www.example.com/jenkins=>localhost:8080/jenkins

www.example.com/solr=>localhost:8081/solr

它不起作用。只有詹金斯一家有效。索尔没有

ProxyPass         /solr  http://localhost:8081/solr nocanon
ProxyPassReverse  /solr  http://localhost:8081/solr
apachectl-S的结果

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)
.
solr.conf文件

<Virtualhost *:80> 
ServerName example.com/solr 
DocumentRoot /var/www/solr/public_html 
ProxyRequests Off 
ProxyPreserveHost On 
AllowEncodedSlashes NoDecode 

<Proxy http://localhost:8081/*>
 Order deny,allow Allow from all 
</Proxy> 

ProxyPass /solr http://localhost:8081/solr nocanon 
ProxyPassReverse /solr http://localhost:8081/solr 

</Virtualhost>

ServerName example.com/solr
DocumentRoot/var/www/solr/public\u html
代理请求关闭
代理主机
AllowEncodeDSL节点代码
命令拒绝,允许从所有
ProxyPass/solrhttp://localhost:8081/solr 诺卡农
ProxyPassReverse/solrhttp://localhost:8081/solr 

将它们放在相同的
conf
文件中。在相同的virtualhost块中?还是不同。我按原样合并了conf文件。而且它不起作用。第一个是带有jenkins proxy和servername的VirthHostBlock,第二个是带有solr proxy和servername的virtualhostblock如果两者都以相同的
servername
值提供,则将它们放在相同的VHost配置中。它与相同的servername一起工作。我有不同的。