Posts Tagged ‘convos’
Running Convos on Apache
Convos is a nice app that allows you to run a persistent IRC client on a machine, and make it available via http to multiple users. The official documentation focuses on nginx, but if you want to run this on Apache, the situation gets tricky.
Fear not, here’s the code snippet that you need to use for your configuration:
<Proxy *>
Require all granted
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / ws://127.0.0.1:$PORT$/ keepalive=On
ProxyPassReverse / http://127.0.0.1:$PORT$/
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:$PORT$/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://127.0.0.1:$PORT$/$1 [P,L]
RequestHeader set X-Forwarded-Proto “https”
RequestHeader set X-Forwarded-HTTPS “1”
RequestHeader set Host “hostedconvos.yourdomain.com”
RequestHeader set Connection “upgrade”
RequestHeader set X-Forwarded-For “hostedconvos.yourdomain.com”
Make sure to replace $PORT$ with whatever port you’re running the Convos daemon on, and also make sure to put an SSL certificate on that Apache virtual host.