forked from openprocurement/openprocurement.ansible.edr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproxy_playbook.yml
36 lines (34 loc) · 1009 Bytes
/
proxy_playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- hosts: server
remote_user: "{{ deploy_user }}"
roles:
-
role: users
-
role: server
-
role: geerlingguy.nginx
become: true
nginx_vhosts_filename: "edr_proxy.conf"
nginx_keepalive_timeout: "65"
nginx_keepalive_requests: "100"
nginx_vhosts:
-
listen: "80 default_server"
server_name: "_"
extra_parameters: |
proxy_redirect off;
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
location /api/0/ {
proxy_pass http://127.0.0.1:{{ proxy_port }}/api/1.0/;
}
location /api/1/ {
proxy_pass http://127.0.0.1:{{ proxy_port }}/api/1.0/;
}
location / {
proxy_pass http://127.0.0.1:{{ proxy_port }}/;
}