Giter VIP home page Giter VIP logo

puppet-nginx's Introduction

nginx

This is the nginx module.

Basic usage

This module manages nginx.

It should be included on any host that needs nginx.

class { 'nginx': }

Configuring a vhost

To build the basic skeleton of a vhost the nginx::vhost type can be used. It will generate a nginx configuration file and symlink it after which nginx is reloaded.

To expand on that configuration and include arbitrary configuration this module does not provide for the nginx::vhost::config type is provided. The target parameter of that module must be the name of the nginx::vhost resource you created before.

nginx::vhost { 'site1':
  server_name => 'site.example.com',
}

nginx::vhost::config { 'site1-http-extra-option':
  target  => 'site1',
  order   => '120',
  content => 'Arbitrary configuration you want to add to the generated file',
}

Order

This module and it's types make heavy use of the native concat type from the Onyxpoint concat module.

In order to be able to inject configuration in either the generated nginx.conf or one of the vhosts order ranges have been set up.

Order nginx.conf

  • 001: the first line this module generates. If you need something before that, an order of 000.
  • 010: opens the 'events' configuration block
  • 011: writes the default events configuration block provided by this module
  • 012-018: free for your use
  • 019: closes the 'events' configuration block
  • 020: opens the 'http' configuration block
  • 021: writes the default http configuration provided by this module
  • 022-028: free for your use
  • 029: closes the 'http' configuration block
  • 030-099: free for your use

Order vhost

  • 000: opens the 'upstream' block
  • 001-098: free for your use
  • 099: closes the 'upstream' block
  • 100: opens the 'http' block
  • 101-198: free for your use
  • 199: closes the' http' block
  • 200: opens the 'https' block
  • 201-298: free for your use
  • 299: closes the 'https' block

Dependencies

This module depends on the following Puppet modules:

Contributing

Feel free to fork, epand upon this module and send pull requests back our way.

For contributions to be accepted we do require the following:

  • Code must pass without warnings through puppet-lint or have a real good reason as why it can't pass that check.
  • Certain manifests are extensively documented because of how important they are. Should your change touch these manifests you must update the documentation accordingly.
  • Tests must be added or changed to reflect the new behaviour and must of course pass. Tests can be found in the spec/ directory and are written with the help of rspec-puppet.

License

Copyright 2012 - 2013, Nedap Steppingstone.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Support

File an issue at: https://github.com/nedap/puppet-nginx/issues.

puppet-nginx's People

Watchers

Mike Wolterink avatar Peter Vel avatar James Cloos avatar cloud avatar  avatar Igor Springer avatar

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.