我的网络套接字和我的反向代理 Apache 有问题,我已经升级到最新版本 2.4.5 并加载了模块mod_proxy_wstunnel
。
httpd.conf :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.toto.fr
ServerAlias toto.fr
ProxyPass /my_app http://1X.X.X.1:8080/my_app
ProxyPassReverse /web_pmr http://1X.X.X.1:8080/my_app
ProxyPassReverseCookiePath /my_app /
ProxyPassReverseCookieDomain localhost my_app
ProxyRequests off
ProxyTimeout 15
#WEBSOCKETS
ProxyPass /my_app/BasicWebsocketServlet ws://1X.X.X.1:8080/my_app/BasicWebsocketServlet retry=0
ProxyPassReverse /my_app/BasicWebsocketServlet ws://1X.X.X.1:8080/web_pmr/BasicWebsocketServlet retry=0
ErrorLog "logs/my_app_error.log"
LogLevel debug
CustomLog "logs/my_app_access.log" combined
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
当我在本地 URL 中进行测试时,websockets 正在工作,但使用反向代理 Apache,Tomcat 日志中没有任何痕迹。