2015-07-16 16:44:25 +07:00
|
|
|
Nginx for Debian Ansible role
|
|
|
|
=============================
|
2015-07-15 17:14:39 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-HanXHX.nginx-blue.svg)](https://galaxy.ansible.com/list#/roles/4399) [![Build Status](https://travis-ci.org/HanXHX/ansible-nginx.svg?branch=master)](https://travis-ci.org/HanXHX/ansible-nginx)
|
2015-08-04 17:40:54 +07:00
|
|
|
|
2015-07-31 17:28:25 +07:00
|
|
|
Install and configure Nginx on Debian.
|
|
|
|
|
2016-01-12 20:48:53 +07:00
|
|
|
Features:
|
|
|
|
|
|
|
|
- SSL/TLS "hardened" support
|
|
|
|
- Manage basic auth on vhost / location
|
|
|
|
- Proxy + Upstream
|
|
|
|
- Fast PHP configuration
|
|
|
|
- Preconfigured vhost templates (should work on many app)
|
2016-01-12 21:10:43 +07:00
|
|
|
- Auto-configure HTTP2 on SSL/TLS vhosts
|
2015-07-15 17:14:39 +07:00
|
|
|
|
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
2016-01-11 21:16:24 +07:00
|
|
|
None. If you set true to `nginx_backports`, you must install backports repository before lauching this role.
|
2015-07-15 17:14:39 +07:00
|
|
|
|
|
|
|
Role Variables
|
|
|
|
--------------
|
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
### Packaging
|
|
|
|
|
2016-01-12 20:48:53 +07:00
|
|
|
- `nginx_apt_package`: APT nginx package (try: apt-cache search ^nginx)
|
|
|
|
- `nginx_backports`: Install nginx from backport repository (bool)
|
2016-01-12 18:14:36 +07:00
|
|
|
|
|
|
|
### Shared
|
|
|
|
|
2016-01-12 20:48:53 +07:00
|
|
|
- `nginx_root`: root directory where you want to have your files
|
|
|
|
- `nginx_log_dir`: log directory (if you change it, don't forget to change logrotate config)
|
|
|
|
- `nginx_resolver`: list of DNS resolver (default: OpenDNS)
|
|
|
|
- `nginx_error_log_level`: default log level
|
2016-01-12 21:10:43 +07:00
|
|
|
- `nginx_auto_config_httpv2`: boolean, auto configure HTTP2 where possible
|
2015-07-16 16:44:25 +07:00
|
|
|
|
|
|
|
### Nginx Configuration
|
|
|
|
|
2016-01-12 20:48:53 +07:00
|
|
|
- `nginx_user`
|
|
|
|
- `nginx_worker_processes`
|
|
|
|
- `nginx_pid`: daemon pid file
|
|
|
|
- `nginx_events_*`: all variables in events block
|
|
|
|
- `nginx_http_*`: all variables in http block
|
|
|
|
- `nginx_custom_http`: instructions list (will put data in `/etc/nginx/conf.d/custom.conf`)
|
2015-07-16 16:44:25 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
Fine configuration
|
|
|
|
------------------
|
2015-10-09 22:54:07 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
[Vhost configuration](doc/vhost.md)
|
2015-10-09 22:54:07 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
[PHP configuration](doc/php.md)
|
2015-07-15 17:14:39 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
[Upstream Configuration](doc/upstream.md)
|
2015-12-03 23:24:58 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
[Vhost configuration](doc/vhost.md)
|
2015-12-03 23:24:58 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
[SSL/TLS Configuration](doc/ssl.md)
|
2015-12-03 23:24:58 +07:00
|
|
|
|
2016-01-12 18:14:36 +07:00
|
|
|
[Basic Auth](doc/auth.md)
|
2015-12-03 23:24:58 +07:00
|
|
|
|
|
|
|
|
2015-07-15 17:14:39 +07:00
|
|
|
Dependencies
|
|
|
|
------------
|
|
|
|
|
2015-07-16 16:44:25 +07:00
|
|
|
None
|
2015-07-15 17:14:39 +07:00
|
|
|
|
|
|
|
Example Playbook
|
|
|
|
----------------
|
|
|
|
|
2015-12-01 22:35:56 +07:00
|
|
|
See [tests/test.yml](tests/test.yml).
|
2015-07-15 17:14:39 +07:00
|
|
|
|
|
|
|
License
|
|
|
|
-------
|
|
|
|
|
2015-07-16 16:44:25 +07:00
|
|
|
GPLv2
|
2015-07-15 17:14:39 +07:00
|
|
|
|
|
|
|
Author Information
|
|
|
|
------------------
|
|
|
|
|
2015-12-01 22:35:56 +07:00
|
|
|
- Twitter: [@hanxhx_](https://twitter.com/hanxhx_)
|
|
|
|
|