Ansible NGINX - Laravel
Install nginx and configure it for the Laravel Framework on Centos/Red Hat
Installation
-
Clone this repository inside your
roles
directory or add as submodule:git submodule add git@github.com:Vinelab/ansible-nginx-laravel roles/nginx
-
In your playbook:
roles:
- nginx
Usage
Parameters
-
required
title
being the title of the site, will be used to name the config/logs file(s)domains
the domains that provides reachability to this site, will be theserver_name
in nginx configpath
the root of the sitepublic_path
the public document where the site will be served from
-
optional
listen
user
gzip
sendfile
tcp_nopush
worker_processes
keepalive_timeout
worked_connections
Usage
vars:
nginx:
user: nginx
gzip: on
sendfile: on
tcp_nopush: on
worker_processes: 1
keepalive_timeout: 65;
worker_connections: 1024
sites:
- title: my-site.com
domains: www.my-site.com my-site.com admin.my-site.com
path: /home/my-site
public_path: /home/my-site/public
- title: another-site.url
listen: 8080
domains: www.another-site.url another-site.url cdn.another-site.url
path: /home/another-site
public_path: /home/another-site/public