haproxy RewriteRule.

This commit is contained in:
Ralph Bean 2014-12-12 20:04:37 +00:00
parent e97acbeafb
commit f8f2047872
4 changed files with 27 additions and 0 deletions

View file

@ -0,0 +1,18 @@
- name: Set up all the haproxy stuff.
hosts: proxies-stg
user: root
gather_facts: True
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- include: "{{ handlers }}/restart_services.yml"
roles:
- role: haproxy/rewrite
website: admin.fedoraproject.org
path: /haproxy

View file

@ -82,4 +82,5 @@
- include: proxies-reverseproxy.yml
- include: proxies-redirects.yml
- include: proxies-fedora-web.yml
- include: proxies-haproxy.yml
- include: proxies-miscellaneous.yml

View file

@ -0,0 +1,6 @@
- template: src=rewrite.conf dest=/etc/httpd.conf.d/{{website}}/haproxy.conf
notify:
- restart httpd
tags:
- haproxy
- haproxy/rewrite

View file

@ -0,0 +1,2 @@
RewriteEngine On
RewriteRule ^{{path}}/(proxy\d+)((?:;.*)?) http://$1:8080/$2 [P,L]