Few minor changes
parent
17905edf30
commit
9779555ac8
29
README.md
29
README.md
|
@ -64,7 +64,7 @@ You can see many examples in: [tests/test.yml](tests/test.yml).
|
|||
- `more`: (O) Add more custom infos.
|
||||
- `upstream_params`: (O) Add upstream params (useful when you want to pass variables to PHP)
|
||||
- `override_try_files`: (O) overrides default try\_files defined in template
|
||||
- `manage_local_content`: (O) Boolean. Set to false if you don't want to manage local content (images, css...). This option is useless if you use proxy `template`
|
||||
- `manage_local_content`: (O) Boolean. Set to false if you don't want to manage local content (images, css...). This option is useless if you use `_proxy` template or `redirect_to` feature.
|
||||
|
||||
(O): Optional
|
||||
(M): Mandatory
|
||||
|
@ -72,13 +72,14 @@ You can see many examples in: [tests/test.yml](tests/test.yml).
|
|||
|
||||
#### Templates
|
||||
|
||||
- `base`: static template
|
||||
- `dokuwiki`
|
||||
- `phalcon`: Phalcon PHP Framework
|
||||
- `php`: PHP base template. Can work with many frameworks/tools
|
||||
- `php_index`: Same as above. But you can only run index.php
|
||||
- `proxy`
|
||||
- `wordpress`
|
||||
- `_base`: static template
|
||||
- `_dokuwiki`
|
||||
- `_redirect`: should not be called explicitly
|
||||
- `_phalcon`: Phalcon PHP Framework
|
||||
- `_php`: PHP base template. Can work with many frameworks/tools
|
||||
- `_php_index`: Same as above. But you can only run index.php
|
||||
- `_proxy`
|
||||
- `_wordpress`
|
||||
|
||||
Templates works as parent-child.
|
||||
|
||||
|
@ -94,7 +95,6 @@ You have many key added to vhost key:
|
|||
(O) : Optional
|
||||
(M) : Mandatory
|
||||
|
||||
|
||||
### Upstream management
|
||||
|
||||
- `nginx_upstreams`: List of dict. An upstream has few keys. See bellow.
|
||||
|
@ -114,8 +114,8 @@ You must set a `path`. For example: *192.168.0.50:8080* or *unix:/tmp/my.sock*.
|
|||
All this params are optional. You should see [Nginx upstream doc](http://nginx.org/en/docs/http/ngx_http_upstream_module.html).
|
||||
|
||||
- `weight`
|
||||
- `max`fails`
|
||||
- `fail`timeout`
|
||||
- `max_fails`
|
||||
- `fail_timeout`
|
||||
- `backup`
|
||||
- `down`
|
||||
- `route`
|
||||
|
@ -129,9 +129,7 @@ None
|
|||
Example Playbook
|
||||
----------------
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: HanXHX.nginx }
|
||||
See [tests/test.yml](tests/test.yml).
|
||||
|
||||
License
|
||||
-------
|
||||
|
@ -141,4 +139,5 @@ GPLv2
|
|||
Author Information
|
||||
------------------
|
||||
|
||||
- Twitter: https://twitter.com/hanxhx
|
||||
- Twitter: [@hanxhx_](https://twitter.com/hanxhx_)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ nginx_log_dir: '/var/log/nginx'
|
|||
nginx_ssl_dir: '/etc/nginx/ssl'
|
||||
nginx_pid: '/run/nginx.pid'
|
||||
nginx_resolver:
|
||||
hosts: ['8.8.8.8', '8.8.4.4'] # OpenDNS
|
||||
hosts: ['8.8.8.8', '8.8.4.4']
|
||||
valid: '300'
|
||||
timeout: '5'
|
||||
nginx_error_log_level: 'warn' # http://nginx.org/en/docs/ngx_core_module.html#error_log
|
||||
|
@ -25,6 +25,7 @@ nginx_dh_length: 2048
|
|||
nginx_php: false
|
||||
nginx_php_sockets:
|
||||
- unix_socket: "/var/run/php5-fpm.sock"
|
||||
nginx_upstreams: []
|
||||
|
||||
#
|
||||
# Nginx configuration
|
||||
|
@ -70,5 +71,7 @@ nginx_http:
|
|||
gzip_disable: '"msie6"'
|
||||
# etag: 'off'
|
||||
|
||||
#
|
||||
# Vhosts
|
||||
#
|
||||
nginx_vhosts: []
|
||||
nginx_upstreams: []
|
||||
|
|
|
@ -39,6 +39,3 @@
|
|||
- name: INCLUDE | Vhosts configuration
|
||||
include: vhost.yml
|
||||
|
||||
# TODO:
|
||||
# - Python
|
||||
# - Ruby (SHIT!)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
- name: TEMPLATE | Deploy PHP upstream to Nginx
|
||||
template: src=etc/nginx/upstream/php.conf.j2 dest=/etc/nginx/conf.d/php.conf
|
||||
when: nginx_php
|
||||
notify: reload nginx
|
||||
|
||||
- name: TEMPLATE | Deploy other upstreams
|
||||
|
|
Loading…
Reference in New Issue