2014-12-26 2 views
0

수신 대기중인 NodeJS에서 Meteor 응용 프로그램을 실행하는 데비안 호스트가 있습니다. 127.0.0.1:3999 또한 Apache에 환영 받고 Meteor 응용 프로그램으로 프록시하는 도메인 등록자 https://example.com이 있습니다.Meteor DDP SSL/Apache 프록시 연결

DDP 연결에 문제가 있습니다. 내 연결 링크가 ws://example.com/websocket

이다 나는 다음과 같이 ProxyPass로 설정을 : 내가 찾은

<VirtualHost *:443> 
     ServerName example.com 
     ServerAlias www.example.com 

     SSLEngine on 
     SSLProxyEngine On 
     ProxyRequests Off 

     SSLCertificateFile /etc/apache2/ssl/www.example.crt 
     SSLCertificateKeyFile /etc/apache2/ssl/www.example.key 
     SSLCertificateChainFile /etc/apache2/ssl/sub.class1.server.ca.pem 

     ProxyPass /websocket ws://localhost:3999/websocket 
     ProxyPassReverse /websocket ws://localhost:3999/websocket 

     ProxyPassMatch ^/sockjs/(.*)/websocket ws://localhost:3999/sockjs/$1/websocket 
     ProxyPass/http://localhost:3999/ 
     ProxyPassReverse/http://localhost:3999/ 

     BrowserMatch "MSIE [2-6]" \ 
      nokeepalive ssl-unclean-shutdown \ 
      downgrade-1.0 force-response-1.0 
     # MSIE 7 and newer should be able to use keepalive 
     BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown 
</VirtualHost> 

그리고

<VirtualHost *:80> 
     ServerName example.com 
     ServerAlias www.example.com 
     ProxyRequests off 


     RewriteEngine on 
     ReWriteCond %{SERVER_PORT} !^443$ 

     # This allows DDP clients like ObjectiveDDP and Meteor-Unity to connect 
     RewriteRule ^/websocket wss://%{HTTP_HOST}/websocket [NC,R,L] 

     # This allows the meteor webapp to connect 
     RewriteRule ^/sockjs/(.*)/websocket wss://%{HTTP_HOST}/sockjs/$1/websocket [NC,R,L] 
     RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] 
</VirtualHost> 

답변

0

솔루션 대신 아파치 2.6 있도록 가능한 것, 우분투를 사용, 데비안을 사용하지 않는 것입니다. mod_proxy_wstunnel은 v2.6의 문제점을 해결했습니다.