내용 건너뛰기

Apache 리버스 프록시의 Websockets 지원 설정 방법

  1. 먼저 다음 변수를 false로 변경하십시오. www\software\html5\settings.js > W.xhrreverse = false; (이를 false로 변경하지 않으면 항상 웹소켓 대신 xhr을 시도하게 되며, 우리는 더 이상 원하지 않습니다.)

  2. 프록시_wstunnel 지원으로 Apache 설치하기 (프록시_wstunnel이 없는 이전 Apache는 지원되지 않습니다!)

  3. Apache 구성에서 허용 (httpd.conf 등) 다음 모듈들입니다. LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so

  4. html5 메인 포털에 서브폴더 “/html5/”를 통해 접근하고자 한다고 가정해 보겠습니다. 예를 들어 http://your_ip_or_domain.net/html5/ 그리고 TSplus가 서버 “intranetxyz”의 인트라넷에 설치되어 있다면, 다음을 구성 파일(httpd.conf 등)에 추가하십시오.

    ProxyPass /html5 http://intranetxyz:80 ProxyPassReverse /html5 http://intranetxyz:80

    ProxyPass “ws://intranetxyz:80/socket.io/websocket_https”

    ProxyPass “ws://intranetxyz:80/socket.io/websocket”

    ProxyPass “ws://intranetxyz:80/socket.io/flashsocket_https”

    ProxyPass “ws://intranetxyz:80/socket.io/flashsocket”

  5. Apache를 재시작하여 변경 사항을 적용하십시오.