Apache mod_proxy将/位置更改为端口

我想实现一个简单的事情 – 代理mydomain.com/plex/*localhost:32400/* 。 我已经有一个不同的代理规则,可以正常工作,但是我无法工作。

我的sites-enabledconfiguration:

 <VirtualHost *:80> ServerName example.com ServerAlias *.example.com ProxyRequests Off ProxyPreserveHost On <Location "/myapp"> ### This works fine, reverse-proxies to a Tomcat server ProxyPass http://localhost:8080/myapp ProxyPassReverse http://example.com/myapp </Location> <Location "/plex"> ### This does not work ProxyPass http://localhost:32400 ProxyPassReverse http://example.com/plex </Location> <Proxy *> Order deny,allow Allow from all </Proxy> </VirtualHost> 

预期:如果我打开URL http://example.com/plex/web/index.html ,则应该在服务器上将其代理到http://localhost:32400/web/index.html – 并且应该获取该页面。 (从服务器打开localhost地址工作正常。

我得到:不幸的是,我得到的是404没有find。

我已经find了一些关于设置Plex反向代理的指南(这是我正在尝试做的),但他们处理的是https ,子域名和其他。 我只想要一个位置和一个端口之间的一个非常简单的redirect。

谢谢你的帮助