Mirror HanXHX/ansible-nginx dari GitHub.
 
 
Go to file
Emilien Mantel 1204dbacd1 [FreeBSD] Enable nginx service 2016-03-15 23:12:17 +01:00
defaults Manage FreeBSD nginx package name 2016-03-07 12:08:34 +01:00
doc always directive managed for add_header option 2016-03-15 15:30:22 +01:00
handlers [FreeBSD] restart nginx on vhost config changed 2016-03-15 23:00:55 +01:00
meta Move to new galaxy version 2016-03-14 19:39:11 +01:00
tasks [FreeBSD] Enable nginx service 2016-03-15 23:12:17 +01:00
templates/etc/nginx Update cipher list (from https://cipherli.st/) 2016-03-15 17:59:48 +01:00
tests use headers instead of more 2016-03-15 17:15:46 +01:00
vars Nagios OK on FreeBSD 2016-03-05 18:34:04 +01:00
.gitignore Gitignore *.retry 2016-03-05 11:06:34 +01:00
.travis.yml Add travis webhook to galaxy 2016-03-05 12:06:08 +01:00
LICENSE Initial commit 2015-07-15 12:12:06 +02:00
README.md README: Change URL in galaxy 2016-03-15 19:48:00 +01:00
Vagrantfile Fix Vagrantfile (debian is not freebsd)... uh? :) 2016-03-09 10:28:06 +01: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

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 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)

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