- httpd 2.4.5 and later
- Enable Apache2 modules:
sudo a2enmod proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html proxy_wstunnel
<VirtualHost *:80 *:443>
ServerName api.mysite.com.br
ServerAlias app.mysite.com.br
DocumentRoot "/webapp/mysite/public"
#SSLEngine On
#SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost on
<Location />
ProxyPass http://0.0.0.0:3000/
ProxyPassReverse http://0.0.0.0:3000/
</Location>
<Location /cable>
ProxyPass ws://mysite.com.br:3000/cable
ProxyPassReverse ws://mysite.com.br:3000/cable
</Location>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Directory "/webapp/mysite/public">
Options FollowSymlinks Multiviews
AllowOverride All
Allow from all
Require all granted
RailsEnv production
</Directory>
#SSLCertificateFile /etc/letsencrypt/live/mysite.com.br/fullchain.pem
#SSLCertificateKeyFile /etc/letsencrypt/live/mysite.com.br/privkey.pem
#Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
sudo services apache2 restart
passenger stop --port 3000
passenger start --daemonize --address 0.0.0.0 --port 3000 -e production
Thank you, I was just thinking to move to NGINX because my action cable was not working but you helped me and it start's working :)