ApacheHTTP服务器、Tomcat和重写
情景: Apache到Tomcat的反向代理:ApacheHTTP服务器、Tomcat和重写,apache,tomcat,mod-rewrite,Apache,Tomcat,Mod Rewrite,情景: Apache到Tomcat的反向代理: 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 我们当前
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>
ServerName sub-domain.example.com
重新启动发动机
重写cond%{SERVER\u PORT}^443$
重写规则^/(*)https://%{SERVER_NAME}/$1[L,R]
斯伦金安
SSLProtocol all-SSLv2
SSLCipherSuite全部:!ADH:!出口:!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
服务器管理员admin@sub-domain.example.com
错误日志/sub-domain.example.com-error\u日志
CustomLog logs/sub-domain.example.com-access\u log common
ProxyPass/apphttp://localhost:8080/app/
ProxyPassReverse/apphttp://localhost:8080/app/
任何帮助都将不胜感激