Apache服务器被配置为Glassfish服务器的代理。 Vaadin应用程序已部署在Glassfish服务器上。 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)。