Mirror HanXHX/ansible-nginx dari GitHub.
 
 
Go to file
Emilien Mantel 0bda544a2f Revert "nginx -t has no side effect"
This reverts commit 2641777abe.
2016-11-02 14:21:32 +01:00
defaults Dynamic module management (closes #23) 2016-10-12 18:13:59 +02:00
doc README improvement pour vhost.filename 2016-10-07 11:01:00 +02:00
handlers Revert "nginx -t has no side effect" 2016-11-02 14:21:32 +01:00
meta Support many php versions (php7) + drop wheezy support 2016-08-09 16:02:09 +02:00
tasks Dynamic modules starts at version 1.9.11 2016-10-12 18:16:53 +02:00
templates/etc/nginx Manage many configurations 2016-10-13 11:11:07 +02:00
tests Manage many configurations 2016-10-13 11:11:07 +02:00
vars Manages PHP minor versions 2016-08-11 11:30:26 +02:00
.gitignore Gitignore *.retry 2016-03-05 11:06:34 +01:00
.travis.yml Manage many configurations 2016-10-13 11:11:07 +02:00
LICENSE Initial commit 2015-07-15 12:12:06 +02:00
README.md Dynamic module management (closes #23) 2016-10-12 18:13:59 +02:00
Vagrantfile Manage many configurations 2016-10-13 11:11:07 +02:00

README.md

Nginx for Debian/FreeBSD Ansible role

Ansible Galaxy Build Status

Install and configure Nginx on Debian/FreeBSD.

Features:

  • SSL/TLS "hardened" support
  • Manage basic auth on vhost / location
  • Proxy + Upstream
  • Fast PHP configuration
  • Preconfigured vhost templates (should work on many app)
  • Auto-configure HTTP2 on SSL/TLS vhosts
  • Manage dynamic modules (install and loading)

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 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
  • nginx_auto_config_httpv2: boolean, auto configure HTTP2 where possible
  • nginx_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 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)
  • nginx_dyn_modules: dynamic module list to load

Fine configuration

Vhost configuration

PHP configuration

Upstream Configuration

SSL/TLS Configuration

Basic Auth

FreeBSD

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