【发布时间】:2017-03-13 09:48:50
【问题描述】:
我需要将路径映射到我的 tomcat Web 应用程序。我为此使用了proxypass。 这是 apache2 中的当前配置
<VirtualHost *:80>
ServerName localhost:80
ProxyPass /app http://localhost:8088/ui/
ProxyPassReverse /app http://localhost:8088/ui/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
这会从 tomcat 获取 HTML,但形成的 css url 是错误的。而不是http://localhost/app/css/style.css,url 映射为http://localhost/ui/css/style.css。
我尝试使用 rewrite 但它不起作用。
RewriteEngine on
RewriteRule ^/ui/ /app/
我需要找到正确的方法来更正 URL。 任何帮助将不胜感激!提前致谢。
【问题讨论】:
标签: apache tomcat mod-rewrite mod-proxy proxypass