Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/danie1k/ansible-role-nginx-with-vhosts

Ansible Role: Install Nginx Web server + Custom VHOST manager
https://github.com/danie1k/ansible-role-nginx-with-vhosts

ansible ansible-galaxy ansible-role centos nginx nginx-configuration nginx-server rhel

Last synced: 22 days ago
JSON representation

Ansible Role: Install Nginx Web server + Custom VHOST manager

Awesome Lists containing this project

README

        

Ansible Role: danie1k.nginx_with_vhosts
=======================================

[![Build Status](https://img.shields.io/travis/danie1k/ansible-role-nginx-with-vhosts)][1]
[![MIT License](https://img.shields.io/github/license/danie1k/ansible-role-nginx-with-vhosts)][2]
[![Ansible Galaxy](https://img.shields.io/badge/galaxy-nginx__with__vhosts-660198.svg)][3]

Installs [NGINX](https://unit.nginx.org/) web server and adds vhosts management tool to your server.

Role Variables
--------------

**server**

| Variable name | Description | Default value |
|--------------------------------------|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| nginx_add_graceful_command | Add `graceful` command to remote system? It's meant to be used by non-root users to **reload** Nginx server | `false` |
| nginx_cloudflare_enabled | Enable CloudFlare integration? | `false` |
| nginx_cloudflare_ssl_certificate | A file with the certificate in the PEM format for the given virtual server | `/etc/ssl/certs/cert.pem` |
| nginx_cloudflare_ssl_certificate_key | A file with the secret key in the PEM format for the given virtual server | `/etc/ssl/private/key.pem` |
| nginx_sblam_enabled | Enable [Sblam!](https://sblam.com/) IP blacklist? | `true` |
| nginx_ssl_session_timeout | A time during which a client may reuse the session parameters | `1d` |
| nginx_ssl_session_cache | Types and sizes of caches that store session parameters. | `shared:MozSSL:10m` |
| nginx_ssl_trusted_certificate | A file with trusted CA certificates in the PEM format used to verify client certificates and OCSP responses | `/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem` |

How to get CloudFlare SSL Origin Certificates: https://kb.virtubox.net/knowledgebase/cloudflare-ssl-origin-certificates-nginx/

Check the following roles for more variables:
* [geerlingguy.nginx](https://galaxy.ansible.com/geerlingguy/nginx)
* [dev-sec.nginx-hardening](https://galaxy.ansible.com/dev-sec/nginx-hardening/)

**vhosts**

| Variable name | Description | Default value |
|----------------------------------|----------------------------------------------------------------------------------------------------|-------------------|
| `nginx_vhost_user` | Name of existing remote host user, who will be an owner of your vhosts web files | - **(Required!)** |
| `nginx_vhost_www_path` | Path on remote machine where all vhost-related data will be stored and owned by `nginx_vhost_user` | - **(Required!)** |
| `nginx_vhost_generic_error_page` | Should use one global error page across all vhosts? | `true` |
| `nginx_vhost_generic_favicon` | Should use one global fallback favicon across all vhosts? | `true` |

Example Playbook
----------------

```yaml
- hosts: servers
roles:
- name: danie1k.nginx_with_vhosts
vars:
nginx_vhost_user: www-data
nginx_vhost_www_path: /var/www
```

License
-------

MIT

[1]: http://travis-ci.org/danie1k/ansible-role-nginx-with-vhosts
[2]: https://github.com/danie1k/ansible-role-nginx-with-vhosts/blob/master/LICENSE
[3]: https://galaxy.ansible.com/danie1k/nginx_with_vhosts