Last active
February 12, 2019 21:13
-
-
Save namnv609/a255f5c69018e7d15421f749a4abd5d4 to your computer and use it in GitHub Desktop.
ActionCable WebSocket with Apache2 proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80 *:443> | |
# Domain | |
ServerName servername.domain | |
SSLEngine On | |
SSLProxyEngine On | |
# Path to SSL CRT file | |
SSLCertificateFile /etc/apache2/ssl/apache.crt | |
# Path to SSL KEY file | |
SSLCertificateKeyFile /etc/apache2/ssl/apache.key | |
ProxyRequests Off | |
ProxyPreserveHost On | |
<Location /> | |
ProxyPass http://0.0.0.0:3000/ | |
ProxyPassReverse http://0.0.0.0:3000/ | |
</Location> | |
<Location /cable> | |
ProxyPass ws://0.0.0.0:3000/cable | |
ProxyPassReverse ws://0.0.0.0:3000/cale | |
</Location> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ForeverYoung This code solved for me.