Browse Source

add domain to group_vars and use it in reverse proxy templates

master
Edoardo Putti 8 years ago
parent
commit
939c23183a
3 changed files with 5 additions and 3 deletions
  1. +2
    -0
      group_vars/all.yaml.example
  2. +1
    -1
      roles/reverse_proxy/templates/http.j2
  3. +2
    -2
      roles/reverse_proxy/templates/map.j2

+ 2
- 0
group_vars/all.yaml.example View File

@ -5,3 +5,5 @@ ext_gateway: ""
user_ca_key: ""
# Put here the public ip for your organisation
public_ip: 0.0.0.0
# Put here the domain for your organisation
domain: ""

+ 1
- 1
roles/reverse_proxy/templates/http.j2 View File

@ -1,7 +1,7 @@
server {
listen {{ public_ip }}:80;
server_name {{ hostname }}.lilik.it www.{{ hostname }}.lilik.it;
server_name {{ hostname }}.{{ domain }} www.{{ hostname }}.{{ domain }};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


+ 2
- 2
roles/reverse_proxy/templates/map.j2 View File

@ -1,2 +1,2 @@
{{ hostname }}.lilik.it {{ hostname }}_https;
www.{{ hostname }}.lilik.it {{ hostname }}_https;
{{ hostname }}.{{ domain }} {{ hostname }}_https;
www.{{ hostname }}.{{ domain }} {{ hostname }}_https;

Loading…
Cancel
Save