Description
I have a fairly standard LAMPs server running on a bananapi (Armbian). With a Let’s Encrypt certificate obtained with a cerbot-script.
I also installed RC with snap, and I can see it running on port 3000, log into it, etc.
No problems so far.
Then I want it to run in a subfolder and followed instructions on
https://rocket.chat/docs/installation/manual-installation/running-in-a-sub-folder/
But all I get is a blank page. Awkwardly, if I look at the source of the blank page, I can see the html-code of RC!
Have a look at https://noppesict.nl/chat (temporary experimental server)
Server Setup Information
I also tried
sudo snap set rocketchat-server site-url=https://noppesict.nl/chat
sudo snap set rocketchat-server root-url="https://noppesict.nl/chat node main.js"
sudo systemctl restart snap.rocketchat-server.rocketchat-server.service
sudo snap set rocketchat-server caddy=disable # I do not need caddy
sudo snap get rocketchat-server
result:
Key Value
caddy disable
https disable
mongo-oplog-url mongodb://localhost:27017/local
mongo-url mongodb://localhost:27017/parties
port 3000
root-url https://noppesict.nl/chat node main.js
site-url https://noppesict.nl/chat
This is my 000-default-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName noppesict.nl
SSLCertificateFile /etc/letsencrypt/live/noppesict.nl/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/noppesict.nl/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/noppesict.nl/chain.pem
<Location /chat>
Require all granted
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /var/www/html/(.*) ws://localhost:3000/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /var/www/html/(.*) http://localhost:3000/$1 [P,L]
ProxyPassReverse http://localhost:3000
</Location>
</VirtualHost>
</IfModule>
What can I do to make RC run under the /chat subfolder? Or, what am I doing wrong?
PS: Running in a subdomain, like chat.noppesict.nl is no option.