Skip to content

Vinelab/ansible-nginx-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 the server_name in nginx config
    • path the root of the site
    • public_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

About

Ansible role for nginx with configuration for Laravel

Resources

License

Stars

Watchers

Forks

Packages

No packages published