代理配置以从文件夹加载所有图像

Proxy configuration to load all images from a folder

我正在使用 Magnolia 5.4,我正在尝试使用 apache http 服务器为 magnolia 页面提供代理传递设置。我是这样配置的

    ProxyPass /travel http://<ip address>:8080/magnoliaPublic/travel.html
    ProxyPass /.resources/** http://<ip address>:8080/.resources/**

旅行配置有效,但不提供图像和 css 文件。因此需要一个配置来加载路径中包含 .resources 的所有图像和文件。我怎样才能做到这一点?塔克斯

我不知道如何加载文件夹,但要加载图像,您可以使用以下配置使用 ProxyPassMatch

     ProxyPassMatch "^/(.*\.png)$" "http://<ip address>:8080/"
     ProxyPassMatch "^/(.*\.jpeg)$" "http://<ip address>:8080/"
     ProxyPassMatch "^/(.*\.jpg)$" "http://<ip address>:8080/"
     ProxyPassMatch "^/(.*\.img)$" "http://<ip address>:8080/"

通过以上配置,apache服务器将扩展名为.png、.jpeg、.jpg、.img的请求转发到指定的url。

参考http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypassmatch了解更多信息