Rocket Chat reverse proxy crashed after upgrade 6.1.5 to 7.1.2

Hello,

after Rocket.Chat upgrade from v6.1.5 to v7.1.2 reverse proxy on Apache has stopped working.
Before upgrade my Rocket Chat instance url links looked like this:
https://mydomain.com/chat/group/mychannel.

After upgrade the links look like this:
https://mydomain.com/group/mychannel

The /chat from URL get cut off every time and browser tell me “The requested URL was not found on this server.”

Below I paste my Apache configuration:

<Location /chat>
    Order allow,deny
    Allow from all

    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule /var/www/(.*)           ws://*rocketchat_instance_ip*:3000/$1 [P,L]
    RewriteCond %{HTTP:Upgrade} !=websocket [NC]
    RewriteRule /var/www/(.*)           http://*rocketchat_instance_ip*:3000/$1 [P,L]

</Location>

From /lib/systemd/system/rocketchat.service:

ROOT_URL=https://*rocketchat_instance_ip*:3000/chat

I am very much asking for your support.

Kind regards,
Marcin

Server Setup Information

  • Version of Rocket.Chat Server: 7.1.2
  • Operating System: Debian 11
  • Deployment Method: Debian package
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v20.19.2
  • MongoDB Version: 5.0.31 / wiredTiger (oplog Enabled)
  • Proxy:
  • Firewalls involved: no

There isn’t a “debian package” I am aware of.

So how have you deployed it?

You have left it a bit late for upgrading. Your version is EOL on the 30th June…

Note there were substantial changes for v7. As a sysadmin you should read all the release notes before upgrading to see what will/won’t affect you,

I am not sure they specifically removed this, but the docs have always been pretty clear that Rocket.Chat should be run on it’s own host eg https://chat.mydomain.com rather than https://host.domain.com/chat

Thank You for quick answer :slight_smile:

My Rocket Chat instance was installed according to this doc:

I have plans to upgrade Rocket Chat and MongoDB to a higher version.
So currently there is no way to use Rocket Chat as a subdirectory? like https://mydomain.com/chat.
Currently, Rocket Chat must have its own subdomain as in the example you provided?

Kind regards,
Marcin

I need to check - this was the subject of much debate over the years as they were going to deprecate and then not. A search here will show you.

I am not sure what has happened and will try and find out but might take a while.

But to be honest you will be much better to use a sub domain as per the docs.

SSL certs are free (I prefer dehydrated compared the overweight monster that is certbot!) so why not?

Just noticed you went from 6.1.x

Waaaayout of date.

That is a huge leap for here.

There were a lot of (controversial) changes at 6.5 and more at 7.x

So yes, somewhere there sub directories were quietly dropped. Check the changelogs. But no, unlikely to come back. So a host is required.

As any version is only supported for 6 months (yup annoying as hell) you really need to be on top of upgrades. I usually track one release behind. So currently 7.6.x + and a test on 7.7.x

As I said above, 7.1 is EOL shortly.

No rest for admins :frowning: