Apache配置WebSocket代理

  • 引入mod_proxy_wstunnel.so模块,使其可以解析ws、wss协议

LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

  • 配置代理路径跳转

Include conf/vhosts.conf

    ServerName yangkl-test.com
    ServerAlias *.yangkl-test.com
    ProxyPass "/shentb/websocket"  "ws://127.0.0.1:8080/shentb/websocket"
    ProxyPass "/shentb/"  "http://127.0.0.1:8080/shentb/"
    ProxyPass "/seller/"  "http://127.0.0.1:8080/seller/"
    ProxyPass "/master/"  "http://127.0.0.1:8080/master/"
    ProxyPass "/history/"  "http://127.0.0.1:8080/history/"
    DocumentRoot "E:\phpStudy\WWW\shentb"
 
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
 

你可能感兴趣的:(java,web)