Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
haproxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Zillmann
haproxy
Commits
6f87f4f5
Commit
6f87f4f5
authored
9 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Make HaProxy to support all Drupal domains and aliases as well
parent
7964f4ca
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
templates/haproxy_cfg
+1
-11
1 addition, 11 deletions
templates/haproxy_cfg
templates/host_list
+10
-0
10 additions, 0 deletions
templates/host_list
templates/host_ssl_list
+10
-0
10 additions, 0 deletions
templates/host_ssl_list
with
21 additions
and
11 deletions
templates/haproxy_cfg
+
1
−
11
View file @
6f87f4f5
...
...
@@ -52,18 +52,14 @@ frontend http-in
{% endfor %}
{% endfor %}
{% for host in groups['all'] %}
{% if hostvars[host].proxy_domains is defined %}
acl domain_in_{{host}} hdr_dom(host) -i -f /etc/haproxy/{{host}}.list
use_backend backend_{{host}} if domain_in_{{host}}
{% endif %}
{% if hostvars[host].proxy_crm_domains is defined %}
acl crm_domain_in_{{host}} hdr_dom(host) -i -f /etc/haproxy/{{host}}.crm.list
use_backend backend_{{host}} if crm_domain_in_{{host}}
{% endif %}
{% if hostvars[host].proxy_ssl_domains is defined %}
acl redirect_ssl_{{host}} hdr_dom(host) -i -f /etc/haproxy/{{host}}.ssl.list
use_backend backend_redirect_ssl if redirect_ssl_{{host}}
{% endif %}
{% endfor %}
{% for cert in proxy_certificates %}
...
...
@@ -77,14 +73,10 @@ frontend https-in
{% endfor %}
{% endfor %}
{% for host in groups['all'] %}
{% if hostvars[host].proxy_ssl_domains is defined %}
acl ssl_domain_in_{{host}} hdr_dom(host) -i -f /etc/haproxy/{{host}}.ssl.list
use_backend backend_{{host}} if ssl_domain_in_{{host}}
{% endif %}
{% if hostvars[host].proxy_domains is defined %}
acl redirect_{{host}} hdr_dom(host) -i -f /etc/haproxy/{{host}}.list
use_backend backend_redirect if redirect_{{host}}
{% endif %}
{% if hostvars[host].proxy_crm_domains is defined %}
acl crm_redirect_{{host}} hdr_dom(host) -i -f /etc/haproxy/{{host}}.list
use_backend backend_redirect if crm_redirect_{{host}}
...
...
@@ -93,11 +85,9 @@ frontend https-in
{% endfor %}
{% for host in groups['all'] %}
{% if (hostvars[host].proxy_domains is defined) or (hostvars[host].proxy_ssl_domains is defined) or (hostvars[host].proxy_crm_domains is defined) %}
backend backend_{{host}}
server server_{{host}} {{hostvars[host]['
ansible_default_ipv4']['address']|default(hostvars[host]['static_ipv4
'])}}:80 maxconn 32
server server_{{host}} {{hostvars[host]['
static_ipv4']|default(hostvars[host]['ansible_default_ipv4']['address
'])}}:80 maxconn 32
{% endif %}
{% endfor %}
backend backend_redirect_ssl
...
...
This diff is collapsed.
Click to expand it.
templates/host_list
+
10
−
0
View file @
6f87f4f5
{% for domain in hostvars[item].proxy_domains|default([]) %}
{{domain}}
{% endfor %}
{% for drupal in hostvars[item].drupal_settings|default([]) %}
{% for domain in drupal.domains|default([]) %}
{% if domain.protocol|default('https') == 'http' %}
{{domain.domain}}
{% for alias in domain.aliases|default([]) %}
{{alias}}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
This diff is collapsed.
Click to expand it.
templates/host_ssl_list
+
10
−
0
View file @
6f87f4f5
{% for domain in hostvars[item].proxy_ssl_domains|default([]) %}
{{domain}}
{% endfor %}
{% for drupal in hostvars[item].drupal_settings|default([]) %}
{% for domain in drupal.domains|default([]) %}
{% if domain.protocol|default('https') == 'https' %}
{{domain.domain}}
{% for alias in domain.aliases|default([]) %}
{{alias}}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment