
我在 Tomcat 中部署了一個 Spring 應用程序,我想透過 Apache2 Web 伺服器代理其 URL,現在我這樣做:
<VirtualHost *:8080>
ProxyPass /app/login http://localhost/app/login
ProxyPassReverse /app/login http://localhost/app/login
ProxyPass /app/home http://localhost/app/home
ProxyPass /app/profile http://localhost/app/profile
...
</VirtualHost>
首先這樣做可以嗎?是否可以只通過/login
然後指定DocumentRoot
?
謝謝