dimanche 12 avril 2015

Apache reverse proxy for wss protocol

My application uses SockJS with Spring Framework. I have a reverse proxy on my server to redirect https requests to tomcat container. Configuration :



<VirtualHost *:443>
ProxyPreserveHost On

ProxyPass /boot http://127.0.0.1:8080/boot/
ProxyPassReverse /boot http://127.0.0.1:8080/boot/

ServerName MY_DOMAIN.com

SSLEngine on
SSLProtocol all
SSLCertificateFile /etc/apache2/ssl/muhamo.crt
SSLCertificateKeyFile /etc/apache2/ssl/muhamo.key
SSLCACertificateFile /etc/apache2/ssl/bundl.crt
</VirtualHost>


How can I configure my virtual host to forward wss requests to my application? I get the error messages like :



Opening Web Socket...
sockjs.js:1213 WebSocket connection to 'http://wssMY_DOMAIN.com/boot/tracking/557/jcf7btih/websocket' failed: Error during WebSocket handshake: Unexpected response code: 403

sockjs.js:807 POST https://MY_DOMAIN.com/boot/tracking/557/7cl9qov2/xhr_streaming 403 (Forbidden)

sockjs.js:807 POST https://MY_DOMAIN.com/boot/tracking/557/cvl8ti6k/xhr 403 (Forbidden)

Aucun commentaire:

Enregistrer un commentaire