apache2 reverseproxy #4

Supports: trusty
Add to new model


This is a subordinate charm for Apache. This allows configuration to live
near Apache, and still be easy to manage.


This charm provides reverse proxying as a subordinate, so that site-specific
configuration lives on the subordinate.

Example usage

# Deploying juju-reports is left as an exercise for the reader.
juju deploy apache2
juju deploy cs:~abentley/trusty/apache2-reverseproxy
juju set apache2-reverseproxy domain_name=reports.org
juju add-relation apache2-reverseproxy:extension apache2
juju add-relation apache2-reverseproxy juju-reports


To enable HTTPS, upload a certificate and key to your apache2 instances.
Set ssl_certlocation and ssl_keylocation to the paths of these files. HTTPS
will automatically be activated when these two values are non-blank.

Multiple sites

To proxy multiple sites, create an apache2-reverseproxy service for each site.
Instead of accepting the default service name, you'll need to specify:

#Site 1
juju deploy cs:~abentley/trusty/apache2-reverseproxy reportsproxy
juju set reportsproxy domain_name=reports.org
juju add-relation reportsproxy:extension apache2
juju add-relation reportsproxy juju-reports
#Site 2
juju deploy cs:~abentley/trusty/apache2-reverseproxy ciproxy
juju set ciproxy domain_name=ci.org
juju add-relation ciproxy:extension apache2
juju add-relation ciproxy juju-reports

Sites external to the juju environment

To proxy a an external site that is not under juju's control, specify
'external_host' in the config. This provides the information that
would otherwise come the website relation. For example:

juju deploy apache2
juju deploy cs:~abentley/trusty/apache2-reverseproxy data-proxy
juju set data-proxy domain_name=data.org external_host=data.example.org:80
juju add-relation data-proxy:extension apache2


(string) The domain name to use for the proxied site.
(string) URL of an error page to download and use for 503.
(string) The optional host:port to proxy if the site is outside the juju environment.
(boolean) Forward the request's host header to the proxied site.
(string) Path to the SSL cert.
(string) Path to the SSL key.