无法使用Proxypass获取客户端IP

时间:2018-06-25 10:44:43

标签: apache ssl proxypass mod-ssl

这是一个聊天服务器,我正尝试将端口35555代理到35554,只是为了使我的websockts工作, 它的工作正常,但是当我们的用户加入聊天室时,他们正在获取聊天服务器的IP地址, 我需要proxypass来转发访问者的真实IP地址

<IfModule mod_ssl.c> <VirtualHost *:35555> ServerAdmin webmaster@localhost ServerName Domain.com ServerAlias www.Domain.com DocumentRoot /var/www/html/Domain.com CustomLog /var/www/logs/Domain-wss.com.log combined ErrorLog /var/www/error_logs/Domain-wss.com.log

    # SSL Config 
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/Domain.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/Domain.com/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/Domaint.com/chain.pem

    # Proxy WSS config
    <IfModule mod_proxy.c>
         ProxyPass "/" "ws://******ServerIP:35554/"
         ProxyPassReverse "/" "ws://******ServerIP:35554/"
         RemoteIPHeader X-Forwarded-For
   </IfModule>

</VirtualHost> </IfModule>

Web服务器正在运行Apache 2.4

0 个答案:

没有答案