19
Mar

Running Convos on Apache

   Posted by: Dante   in General

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.

Tags: , ,

This entry was posted on Sunday, March 19th, 2017 at 5:35 am and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment