B4J Question Apache reverse proxy to jetty

wl

Well-Known Member
Licensed User
Longtime User
Hi,

On my VPS (which has a single IP) I need to use apache2 as a webserver.
Fortunately I succeeded in having it reverse proxy a subdomain (redirecting to a Jetty /B4J webserver running on port 8080) through https:// with a Let's encrypt certificate

However, It won't work with websockets (eg: the chatroom application).

Thanks !

This my vhost file for apache:
B4X:
<IfModule mod_ssl.c>
<VirtualHost *:443>
 ServerName mydomain
 DocumentRoot /var/www/html
 SSLCertificateFile /etc/letsencrypt/live/mydomain/cert.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/mydomain/privkey.pem
 Include /etc/letsencrypt/options-ssl-apache.conf
 SSLCertificateChainFile /etc/letsencrypt/live/mydomain/chain.pem
 ProxyPreserveHost On
 ProxyPass / ws://127.0.0.1:8080/
 ProxyPassReverse / ws://127.0.0.1:8080/
</VirtualHost>
</IfModule>
 

wl

Well-Known Member
Licensed User
Longtime User
Solved it somehow: the above configuration is correct.

However b4j_ws needs to be modified as the port when connecting is not correct: this causes a problem on Edge/IE
 
Upvote 0
Top