~hatch/charms/precise/juju-gui/trunk

« back to all changes in this revision

Viewing changes to config/haproxy.cfg.template

  • Committer: Francesco Banconi
  • Date: 2013-03-28 16:25:06 UTC
  • mfrom: (36.1.7 juju-gui)
  • Revision ID: francesco.banconi@canonical.com-20130328162506-dgerjn52ye7433w9
Added support for juju-core.

It is now possible to deploy the charm
in a juju-core environment.
The GUI correctly  connects to the juju-core 
API server.

R=gary.poster, bac
CC=
https://codereview.appspot.com/8081043

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
backend juju
23
23
    # The Juju WebSocket backend.
24
24
    # Re-encrypt outgoing connections.
25
 
    server ws1 127.0.0.1:{{api_port}} ssl ca-file {{api_pem}} verify required check-ssl inter 500ms
 
25
    {{if legacy_juju}}
 
26
        server ws1 {{api_address}} ssl ca-file {{api_pem}} verify required check-ssl inter 500ms
 
27
    {{else}}
 
28
        # Replace "/ws/" with "/" in any request path.
 
29
        reqrep ^([^\ ]*)\ /ws/    \1\ /
 
30
        server ws1 {{api_address}} ssl check-ssl inter 500ms
 
31
    {{endif}}
26
32
 
27
33
backend web
28
34
    # Web traffic.
32
38
    # Redirect all HTTP traffic to HTTPS.
33
39
    bind :80
34
40
    {{if secure}}
35
 
    redirect scheme https if !{ ssl_fc }
 
41
        redirect scheme https if !{ ssl_fc }
36
42
    {{endif}}
37
43
    # Handle HTTPS.
38
44
    bind :443 ssl crt {{web_pem}}