updated haproxy state
This commit is contained in:
parent
17a9aeb847
commit
5632b47023
@ -14,6 +14,7 @@ haproxy:
|
|||||||
lib: false
|
lib: false
|
||||||
maps:
|
maps:
|
||||||
- access
|
- access
|
||||||
|
- domains
|
||||||
- redirects
|
- redirects
|
||||||
- vhosts
|
- vhosts
|
||||||
config:
|
config:
|
||||||
@ -80,5 +81,6 @@ haproxy:
|
|||||||
ddos:
|
ddos:
|
||||||
timeperiod: 10s
|
timeperiod: 10s
|
||||||
maxrequests: 200
|
maxrequests: 200
|
||||||
|
domains: {}
|
||||||
vhosts: {}
|
vhosts: {}
|
||||||
services: {}
|
services: {}
|
||||||
|
@ -121,6 +121,7 @@ frontend https
|
|||||||
mode http
|
mode http
|
||||||
option httplog
|
option httplog
|
||||||
acl internal src -f {{ haproxy.config.dir }}/maps/access
|
acl internal src -f {{ haproxy.config.dir }}/maps/access
|
||||||
|
acl domains req.hdr(Host),map_dom({{ haproxy.config.dir }}/maps/domains) -m found
|
||||||
acl robots_txt path /robots.txt
|
acl robots_txt path /robots.txt
|
||||||
acl path_host path /host
|
acl path_host path /host
|
||||||
acl path_date path /date
|
acl path_date path /date
|
||||||
@ -141,6 +142,7 @@ frontend https
|
|||||||
http-request set-header X-Proto https if { ssl_fc }
|
http-request set-header X-Proto https if { ssl_fc }
|
||||||
log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
|
log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
|
||||||
http-request redirect location %[req.hdr(host),map_dom({{ haproxy.config.dir }}/maps/redirects)] code 301 if { req.hdr(host),map_dom({{ haproxy.config.dir }}/maps/redirects) -m found }
|
http-request redirect location %[req.hdr(host),map_dom({{ haproxy.config.dir }}/maps/redirects)] code 301 if { req.hdr(host),map_dom({{ haproxy.config.dir }}/maps/redirects) -m found }
|
||||||
|
http-request deny deny_status 404 unless domains
|
||||||
use_backend %[req.hdr(Host),lower,map({{ haproxy.config.dir }}/maps/vhosts,nginx)]
|
use_backend %[req.hdr(Host),lower,map({{ haproxy.config.dir }}/maps/vhosts,nginx)]
|
||||||
default_backend nginx
|
default_backend nginx
|
||||||
|
|
||||||
@ -188,7 +190,7 @@ listen {{ name }}
|
|||||||
mode tcp
|
mode tcp
|
||||||
option tcplog
|
option tcplog
|
||||||
{%- if values.type == "postgres" %}
|
{%- if values.type == "postgres" %}
|
||||||
option pgsql-check user postgres
|
option pgsql-check user repmgr
|
||||||
option tcpka
|
option tcpka
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
default-server inter 3s fall 3
|
default-server inter 3s fall 3
|
||||||
|
Loading…
Reference in New Issue
Block a user