rocketchat in subfolder in docker infrastructure with apache2 ssl reverse proxy

#1

I’m sorry if this isn’t the correct place to post this question.
I’m currently struggling to implement a rocket.chat container behind a container that serves as an apache2 https reverse proxy.

I was looking at these parts of the documentation, but can’t quite get it to run with the information provided there.
https://github.com/RocketChat/docs/blob/master/installation/manual-installation/running-in-a-sub-folder/README.md
https://github.com/RocketChat/docs/blob/master/installation/manual-installation/configuring-ssl-reverse-proxy/README.md

Rocket.chat is supposed to be available in a sub folder of the main domain. The container is reachable from inside the docker network with dns name “rocketchat”, but says “Unknown Path” when I’m trying to access https://mydomain.de/rocketchat. My config has ROOT_URL=https://mydomain.de/rocketchat.
Although that same error is mentioned in the documentation, I can’t find a way to fix it.

The culprit is almost certainly the configuration on the apache2 container. From the previously mentioned documentation I concluded I had to add something like this to my apache2:

        <Location /rocketchat>                                                                
                Order allow,deny                                                               
                Allow from all                                                                 
                                                                                               
                RewriteCond %{HTTP:Upgrade} =websocket [NC]                                    
                RewriteRule /(.*)       ws://rocketchat:3000/$1 [P,L]                          
                RewriteCond %{HTTP:Upgrade} !=websocket [NC]                                   
                RewriteRule /(.*)       http://rocketchat:3000/$1 [P,L]                        
                                                                                               
                ProxyPassReverse http://rocketchat:3000/                                       
        </Location>

which is probably very wrong. The required modules, RewriteEngine are both activated though and the SSL proxy configuration is working fine. I already have a bunch of things running on it. I’d very much appreciate some advice as I’m a little stuck.
Thank you!

0 Likes