Apache 反向代理 GatewayWorker 失败

Nathan

小程序项目使用GatewayWorker开发,但是WSS一直成功不了。
我按照手册里设置了Apache 反向代理,

<VirtualHost *:80>
  DocumentRoot "/var/www/html/tetaa"
  ServerName tetaa.brightcloud-tech.com

        #LoadModule proxy_module modules/mod_proxy.so
        LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

        ErrorLog ${APACHE_LOG_DIR}/quant/error.log
        CustomLog ${APACHE_LOG_DIR}/quant/access.log combined

        # a add
        # Proxy Config
        SSLProxyEngine on

        ProxyRequests Off
        ProxyPass /wss ws://127.0.0.1:7272
        ProxyPassReverse /wss ws://127.0.0.1:7272

        # 添加 SSL 协议支持协议,去掉不安全的协议
        SSLProtocol all -SSLv2 -SSLv3
        # 修改加密套件如下
        SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM
        SSLHonorCipherOrder on
        SSLCertificateFile /etc/apache2/cert/public.pem
        SSLCertificateKeyFile /etc/apache2/cert/214675772330006.key

        #   Server Certificate Chain:
        #   Point SSLCertificateChainFile at a file containing the
        #   concatenation of PEM encoded CA certificates which form the
        #   certificate chain for the server certificate. Alternatively
        #   the referenced file can be the same as SSLCertificateFile
        #   when the CA certificates are directly appended to the server
        #   certificate for convinience.
        #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
        SSLCertificateChainFile /etc/apache2/cert/chain.pem

        # a add
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

   <Directory "/var/www/html/tetaa">
           RewriteEngine on
           # If a directory or a file exists, use the request directly
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteCond %{REQUEST_FILENAME} !-d
           # Otherwise forward the request to index.php
           RewriteRule . index.php

           # use index.php as index file
           DirectoryIndex index.php

        Require all granted

   </Directory>
</VirtualHost> 

可是小程序还是一连接就断开。

在Gateway中可以出发Onconnect事件,但是同样会断开。 请问是哪里设置错了吗?

3853 2 0
2个回答

Nathan

WebSocket connection to 'wss://tetaa.brightcloud-tech.com/' failed: Error during WebSocket handshake: Unexpected response code: 200

这是小程序段断开连接时的Log

  • 暂无评论
maq

80 端口?

  • 暂无评论
年代过于久远,无法发表回答
×
🔝