Giter VIP home page Giter VIP logo

puppet_nginix's Introduction

NGINX module for Puppet

Install and bootstrap an NGINX instance

class { 'nginx': }

A virtual host

By default vhost is configured:

  • to works with fpm-php, it connect to "unix:/var/run/php5-fpm-${name}.sock",
  • document_root is "/srv/www/${name}",
  • tcp_port is '80'
  • listen ip_addr is'*'
  • document_index is 'index.php'
  • php_proxy is true
  • https is false
  • log_dir is '/var/log/nginx'
nginx::vhost2  { "domain.com": }

A virtual host with alias name

nginx::vhost2  { "domain.com": 
    vhost_aliases => 'www.domain.com www2.domain.com',
}

Locations

Module split all config for the location. Each location has parameters:

  • name: name of resource
  • location: location in nginix, for example '~ .php$'
  • deny set "all" if you want reject locations
  • order: defines the order in the config file
  • authentication set true if you want login to location
  • authentication_file patch to file witch user and pass authentication_file
  • description add desctiption to config file
  • params, any location parameters

For example authentication for root location

nginx::vhost2  { "domain.com": 
    authentication => { 'user'=>'$apr1$epIUboiA$QggYxiTUOeGWYweiBVyqL.'}, #test:test
    locations => {
        'root' => {
            'authentication' => true,
        }
    }
}

###SSL configuration

nginx::vhost2  { "domain.com": 
    tcp_port => '443',
    https => true,
    ssl_certificate => "somecert.crt",
    ssl_certificate_key => "somecert.key",
}

puppet_nginix's People

Contributors

jarekherisz avatar

Watchers

James Cloos avatar  avatar

Forkers

suhadri

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.