1

设想:

Tomcat 的 Apache 反向代理:

https://sub-domain.example.com:8080/app

对此:

https://sub-domain.example.com/app

解析到应用程序时,它会附加如下:

https://sub-domain.example.com/app/somedir/some.jsp

在请求处理过程中有没有办法我们可以删除最后一个附件,以便最终用户看到以下内容:

https://sub-domain.example.com/app

我们当前的 Apache 配置:

ServerName sub-domain.example.com
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]

<VirtualHost *:443>
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateChainFile /etc/pki/tls/certs/VendorCA.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key
ServerName sub-domain.example.com
ServerAdmin admin@sub-domain.example.com
ErrorLog logs/sub-domain.example.com-error_log
CustomLog logs/sub-domain.example.com-access_log common
ProxyPass /app http://localhost:8080/app/
ProxyPassReverse /app http://localhost:8080/app/
</VirtualHost>

任何帮助将不胜感激。

4

0 回答 0