나는 아파치 설정을 고수했다.아파치를 통해 Play-Framework에 WebSocket을 프록시하는 방법
는 config는 다음과 같이이다 :
- 아파치는 HTTPS
- 그것은 https://domain.tld/app1http://domain.tld:9000/app1에 (플레이 앱을 앱 컨텍스트에서 실행하는 등의 요청을 프록시를 모든 HTTP 트래픽을 리디렉션/응용 프로그램 */...)이 다음 아파치 설정과 아주 잘 작동
:
<VirtualHost *:80>
ServerName domain.tld
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Redirect permanent/https://domain.tld/
Redirect permanent/https://domain.tld/
</VirtualHost>
<VirtualHost _default_:443>
#ssl-config here
<Proxy http://localhost:9000/*>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /app1 http://domain.tld:9000/app1
ProxyPassReverse /app1 http://domain.tld:9000/app1
ProxyPassReverse /app1 http://domain.tld/app1
</VirtualHost>
문제는 하나의 재생 응용 프로그램에 WebSocket이 추가 된 것입니다. 위의 설정으로는 작동하지 않습니다. 그래서 나는 play-pages에있는 내용을 읽었습니다. 그래서 mod_proxy_wstunnel을 설치하게되었습니다. 나는 또한 설정에 다음 줄을 추가,하지만 아무 성공도 없었다 :
ProxyPass /app1/timerWs ws://domain.tld:9000/app1/timerWs
ProxyPassReverse /app1/timerWs ws://domain.tld:9000/app1/timerWs
나는 내가 500 내부 서버 오류가 발생했습니다 https://domain.tld/rlc/timerWs에 연결을 시도하고 있지만, 새로운, 더 구체적인 오류가 없습니다 아파치 오류 로그에.
재생 응용 프로그램에 WebSocket 요청을 올바르게 프록시하도록 Apache를 구성하려면 어떻게합니까?
내 play-apps에는 https 어댑터가 없습니다. 모든 https 작업은 Apache-proxy에 의해 수행됩니다.
Play-apps의 버전 2.5입니다. Apache가 2.4.7입니다.
도움을 주셔서 감사합니다. Tobias