Captive portal #11
4 changed files with 51 additions and 5 deletions
40
host_vars/portail.adm.auro.re.yml
Normal file
40
host_vars/portail.adm.auro.re.yml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
---
|
||||||
|
certbot:
|
||||||
|
domains:
|
||||||
|
- portail.auro.re
|
||||||
|
mail: tech.aurore@lists.crans.org
|
||||||
|
certname: auro.re
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
ssl:
|
||||||
|
cert: /etc/letsencrypt/live/auro.re/fullchain.pem
|
||||||
|
cert_key: /etc/letsencrypt/live/auro.re/privkey.pem
|
||||||
|
trusted_cert: /etc/letsencrypt/live/auro.re/chain.pem
|
||||||
|
|
||||||
|
redirect_dnames: {}
|
||||||
|
|
||||||
|
redirect_tcp: {}
|
||||||
|
|
||||||
|
redirect_sites:
|
||||||
|
- from: portail.adm.auro.re
|
||||||
|
to: portail.auro.re
|
||||||
|
norequesturi: true
|
||||||
|
|
||||||
|
- from: 10.128.0.247
|
||||||
|
to: portail.auro.re
|
||||||
|
norequesturi: true
|
||||||
|
|
||||||
|
- from: 45.66.111.247
|
||||||
|
to: portail.auro.re
|
||||||
|
norequesturi: true
|
||||||
|
|
||||||
|
reverseproxy_sites:
|
||||||
|
- from: portail.auro.re
|
||||||
|
to: 10.128.0.20
|
||||||
|
custom_args:
|
||||||
|
- "allow 45.66.108.251"
|
||||||
|
- "allow 45.66.108.252"
|
||||||
|
- "allow 45.66.108.253"
|
||||||
|
- "allow 45.66.108.254"
|
||||||
|
- "allow 45.66.108.255"
|
||||||
|
- "deny all"
|
|
@ -9,7 +9,7 @@ server {
|
||||||
server_name {{ site.from }};
|
server_name {{ site.from }};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 302 http://{{ site.to }}$request_uri;
|
return 302 http://{{ site.to }}{% if site.norequesturi is not defined %}$request_uri{% endif %};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ server {
|
||||||
include "/etc/nginx/snippets/options-ssl.conf";
|
include "/etc/nginx/snippets/options-ssl.conf";
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 302 https://{{ site.to }}$request_uri;
|
return 302 https://{{ site.to }}{% if site.norequesturi is not defined %}$request_uri{% endif %};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ server {
|
||||||
server_name {{ from }};
|
server_name {{ from }};
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 302 http://{{ site.to }}$request_uri;
|
return 302 http://{{ site.to }}{% if site.norequesturi is not defined %}$request_uri{% endif %};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ server {
|
||||||
include "/etc/nginx/snippets/options-ssl.conf";
|
include "/etc/nginx/snippets/options-ssl.conf";
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 302 https://{{ site.to }}$request_uri;
|
return 302 https://{{ site.to }}{% if site.norequesturi is not defined %}$request_uri{% endif %};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,12 @@ server {
|
||||||
set_real_ip_from 2a0c:700:0:2::/64;
|
set_real_ip_from 2a0c:700:0:2::/64;
|
||||||
real_ip_header P-Real-Ip;
|
real_ip_header P-Real-Ip;
|
||||||
|
|
||||||
|
{% if site.custom_args is defined -%}
|
||||||
|
{% for arg in site.custom_args %}
|
||||||
|
{{ arg }};
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://{{ site.to }};
|
proxy_pass http://{{ site.to }};
|
||||||
include "/etc/nginx/snippets/options-proxypass.conf";
|
include "/etc/nginx/snippets/options-proxypass.conf";
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
- passbolt
|
- passbolt
|
||||||
|
|
||||||
# Deploy reverse proxy
|
# Deploy reverse proxy
|
||||||
- hosts: proxy*.adm.auro.re
|
- hosts: portail.adm.auro.re,proxy*.adm.auro.re
|
||||||
roles:
|
roles:
|
||||||
- certbot
|
- certbot
|
||||||
- nginx_reverseproxy
|
- nginx_reverseproxy
|
||||||
|
|
Loading…
Reference in a new issue