homeserver/Archiv/ReverseProxy-nginx/hispanico.letsencrypt-nginx-revproxy
2020-10-19 09:35:32 +02:00
..
defaults Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00
handlers Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00
meta Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00
tasks Housekeeping (#52) 2020-10-19 09:35:32 +02:00
templates Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00
tests Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00
vars Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00
.travis.yml Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00
README.md Playbooks, Roles und vars für ReverseProxy in Archiv (#51) 2020-10-18 19:31:27 +02:00

ansible-letsencrypt-nginx-revproxy

Build Status Galaxy

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