由于我们使用WebSocket功能部署了应用程序,因此我们发现了以下问题:
一旦5-10页重新加载而不是新页面,浏览器开始下载短(2字节)文件。问题似乎是随机的。
这个问题并没有出现在"裸露的" Tomcat部署。
我们的筹码是:
httpd.conf
<VirtualHost *:80>
ServerName my.application.com
Redirect / https://my.application.com
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/html
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{request_uri} [R=301,L]
ServerAdmin webmaster@datacave.ch
SSLEngine on
SSLCertificateKeyFile my.application.com.key
SSLCertificateFile my.application.com.crt
SSLCertificateChainFile sub.class4.server.ca.pem
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
ServerName my.application.com
ServerAlias application1.application.local
ErrorLog /var/www/logs/application/application-error_log
CustomLog /var/www/logs/application/application-access_log combined
<FilesMatch "\.(eot|woff|ttf|otf|svg)">
<IfModule mod_headers.c>
SetEnvIf Origin "http(s)?://(.+\.)?(application.com|application.local)$" AccessControlAllowOrigin=$0$1
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Credentials true
</IfModule>
</FilesMatch>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLProxyEngine Off
ProxyRequests Off
ProxyPass / ajp://application1.application.local:8009/
ProxyPassReverse / ajp://application1.application.local:8009/
</VirtualHost>
server.xml中
<Connector port="8009" protocol="org.apache.coyote.ajp.AjpNioProtocol" redirectPort="8080" URIEncoding='UTF-8'/>
如何解决?