Acho que a documentação oficial do Rocket.Chat é clara:
Running behind an Apache SSL Reverse ProxyRun this as root:
apt-get update apt-get install apache2 a2enmod proxy_http a2enmod proxy a2enmod ssl a2enmod proxy_wstunnel a2enmod rewriteAdd your private key to
/etc/ssl/private/chat.domain.com.keyLock down permissions:
chmod 400 /etc/ssl/private/chat.domain.com.keyAdd your certificate to
/etc/ssl/certs/chat.domain.com.crtAdd your intermediate to
/etc/ssl/certs/intermediate.ca.pemEdit
/etc/apache2/sites-enabled/rocketchat.confand be sure to use your actual hostname in lieu of the sample hostname “your_hostname.com” below.<VirtualHost *:443> ServerAdmin [email protected] ServerName chat.domain.com ErrorLog /var/log/chat.domain.com_error.log TransferLog /var/log/chat.domain.com_access.log LogLevel info SSLEngine On SSLCertificateFile /etc/ssl/certs/chat.domain.com.crt SSLCertificateKeyFile /etc/ssl/private/chat.domain.com.key SSLCertificateChainFile /etc/ssl/certs/intermediate.ca.pem <Location /> Order allow,deny Allow from all </Location> RewriteEngine On RewriteCond %{HTTP:Upgrade} =websocket [NC] RewriteRule /(.*) ws://localhost:3000/$1 [P,L] RewriteCond %{HTTP:Upgrade} !=websocket [NC] RewriteRule /(.*) http://localhost:3000/$1 [P,L] ProxyPassReverse / http://localhost:3000/ </VirtualHost>Restart Apache:
service apache2 restart
Quando diz
be sure to use your actual hostname in lieu of the sample hostname “your_hostname.com”
isso provavelmente significa
be sure to use your actual external https address (e.g.,
https://www.example.com) in lieu ofhttp://localhost:3000
