45f800fe18 | ||
---|---|---|
defaults | ||
doc | ||
filter_plugins | ||
handlers | ||
meta | ||
tasks | ||
templates/etc | ||
tests | ||
vars | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
Vagrantfile |
README.md
Nginx for Debian/FreeBSD Ansible role
Install and configure Nginx on Debian/FreeBSD.
Features:
- SSL/TLS "hardened" support
- Manage basic auth on site / location
- Proxy + Upstream
- Fast PHP configuration
- Preconfigured site templates (should work on many app)
- Auto-configure HTTP2 on SSL/TLS sites
- Manage dynamic modules (install and loading)
- Deploy custom facts.d with sites config
- Can listen with proxy protocol
Requirements
None. If you set true to nginx_backports
, you must install backports repository before lauching this role.
Role Variables
Packaging
Debian:
nginx_apt_package
: APT nginx package (try: apt-cache search ^nginx)nginx_backports
: Install nginx from backport repository (bool)
FreeBSD:
nginx_pkgng_package
: PKGNG nginx package (should be "nginx" or "nginx-devel")
Shared
nginx_root
: root directory where you want to have your filesnginx_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 levelnginx_auto_config_httpv2
: boolean, auto configure HTTP2 where possiblenginx_fastcgi_fix_realpath
: boolean, use realpath for fastcgi (fix problems with symlinks and PHP opcache)
Nginx Configuration
nginx_user
nginx_worker_processes
nginx_pid
: daemon pid filenginx_events_*
: all variables in events blocknginx_http_*
: all variables in http blocknginx_custom_http
: instructions list (will put data in/etc/nginx/conf.d/custom.conf
)nginx_dyn_modules
: dynamic module list to load
About modules
Last updates from Debian backports loads modules from /etc/nginx/modules-enabled directory. Disabling/Enabling is not supported anymore. Please wait further update.
Fine configuration
Note
- Active support for Debian.
- FreeBSD support is experimental (no Travis). I only test (for the moment) 10.2 (but it can work on other versions).
- I don't manage BackupPC for FreeBSD (PR welcome).
Dependencies
None
Example Playbook
See tests/test.yml.
License
GPLv2
Author Information
- Twitter: @hanxhx_