Skip to content

Instantly share code, notes, and snippets.

@bitdivine
Created April 15, 2015 19:50
Show Gist options
  • Save bitdivine/3366f3d21e025cac3b83 to your computer and use it in GitHub Desktop.
Save bitdivine/3366f3d21e025cac3b83 to your computer and use it in GitHub Desktop.
Reverse proxy InfluxDB on Apache
<VirtualHost *:80>
ServerName your.host.com
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Rewrite links to 8086 on the way out:
#AddOutputFilterByType SUBSTITUTE application/javascript # use this if you have disabled compression
AddOutputFilterByType INFLATE;SUBSTITUTE;DEFLATE application/javascript
Substitute "s?this.port=e.port||8086?this.port='80/pink_panther'?ni"
ProxyPass "/pink_panther/" http://localhost:8086/
ProxyPassReverse "/pink_panther/" http://localhost:8086/
ProxyPass / http://localhost:8083/
ProxyPassReverse / http://localhost:8083/
</VirtualHost>
@bitdivine
Copy link
Author

Note: You will need to have mod_substitute enabled: a2enmod substitute
Reference: http://httpd.apache.org/docs/2.2/mod/mod_substitute.html
Note: In the current build of InfluxDB the port is set in but one place, as far as I can tell, and the substitution takes care of that one place. If you have a different build you may have to make other substitutions. Search for the port number in the source, subvert it and rock on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment