Apache 服务器被配置为 Glassfish 服务器的代理。在 Glassfish 服务器上部署了 Vaadin 应用程序。应用程序加载失败并出现 CSS。Apache 配置或 Glassfish 应用程序/配置有问题吗?
该系统使用 Apache 2.4 和 Glassfish 5 进行配置。该应用程序使用 Vaadin 6.8 构建,Glassfih 已经配置了 ajp 连接器。
虚拟主机配置:
<VirtualHost *:443>
...
SSLEngine on
SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
SSLProtocol All -SSLv3
SSLHonorCipherOrder On
SSLCompression off
SSLCertificateFile /etc/ssl/private/cert.pem
SSLCertificateKeyFile /etc/ssl/private/privkey.pem
SSLCertificateChainFile /etc/ssl/private/ca-crt.pem
<IfModule setenvif_module>
BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</IfModule>
...
<IfModule rewrite_module>
RewriteEngine On
# LogLevel alert rewrite:trace3
RewriteRule ^/api/(.*)$ /api/$1 [NC,PT]
RewriteRule ^/myapp$ /myapp [NC,PT]
RewriteRule ^/myapp/(.*)$ /myapp/$1 [NC,PT]
RewriteRule ^(.*) /office [PT,L]
</IfModule>
...
<IfModule proxy_module>
<Proxy *>
AddDefaultCharset Off
Order deny,allow
Allow from all
</Proxy>
<IfModule proxy_ajp_module>
ProxyPass /myapp ajp://localhost:8009/myapp timeout=60
</IfModule>
</IfModule>
</VirtualHost>
Apache error_log 显示以下错误:
[Fri Aug 16 22:08:18.228731 2019] [proxy_ajp:error] [pid 3629:tid 140277591308032] (70014)End of file found: AH01030: ajp_ilink_receive() can't receive header
[Fri Aug 16 22:08:18.228764 2019] [proxy_ajp:error] [pid 3629:tid 140277591308032] [client 192.168.34.1:50484] AH00992: ajp_read_header: ajp_ilink_receive failed, referer: https://mydom.com/office/VAADIN/themes/reindeermods/styles.css
[Fri Aug 16 22:08:18.228776 2019] [proxy_ajp:error] [pid 3629:tid 140277591308032] (120006)APR does not understand this error code: [client 192.168.34.1:50484] AH00893: dialog to [::1]:8009 (app.ti-mm.com) failed, referer: https://mydom.com/office/VAADIN/themes/reindeermods/styles.css
并且应用程序显示一条消息,它无法加载 javascript 资源(js.nocache Vaadin artefact)。