e7be0f64f4
Inventorie-Einträge gelöscht ... durch Traefik ersetzt
2.4 KiB
2.4 KiB
ansible-letsencrypt-nginx-revproxy
Configures Nginx as reverse proxy for multiple website with Let's Encrypt certificate.
Requirements
This role requires Ansible 1.9 or higher.
Role Variables
Default values:
nginx_revproxy_sites: # List of sites to reverse proxy
example.com: # Domain name
domains: # List of server_name aliases
- example.com
- www.example.com
upstreams: # List of Upstreams
- { backend_address: 192.168.0.100, backend_port: 80 }
- { backend_address: 192.168.0.101, backend_port: 8080 }
letsencrypt: true # Set to True if you are using hispanico.letsencrypt-nginx-revproxy role
letsencrypt_email: 'contatti@ninux.org'
Dependencies
Example Playbook
This esample configure nginx as reverse proxy for the following sites:
- example.org with selfsign ssl certificate
- example.com ssl certificate generate via let's encrypt ACME protocol.
- hosts: all
roles:
- ansible-nginx-revproxy
- ansible-letsencrypt-nginx-revproxy
vars:
nginx_revproxy_sites:
example.org:
domains:
- example.org
- www.example.org
upstreams:
- { backend_address: 192.168.0.200, backend_port: 80 }
- { backend_address: 192.168.0.201, backend_port: 80 }
letsencrypt: false
example.com:
domains:
- example.com
- www.example.com
upstreams:
- { backend_address: 192.168.0.100, backend_port: 80 }
- { backend_address: 192.168.0.101, backend_port: 80 }
letsencrypt: true
License
Licensed under the GPLv3 License. See the LICENSE file for details.
Author Information
Hispanico