Forge Home

php_fastcgi

Configures upstart job for php5-cgi

9,721 downloads

8,984 latest version

3.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.5 (latest)
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1 (deleted)
released Apr 12th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'MiMediaINC-php_fastcgi', '0.0.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add MiMediaINC-php_fastcgi
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install MiMediaINC-php_fastcgi --version 0.0.5

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

MiMediaINC/php_fastcgi — version 0.0.5 Apr 12th 2013

php_fastcgi puppet Module

When deploying web servers such as nginx which do not have the ability to spawn their own fastcgi sessions, it is useful to run php5-cgi as a service. On distributions such as ubuntu which ship with the upstart utility, we have found that using an upstart script in lieu of an init script that we are provided with a more simplistic solution which affords us further flexibility than an init script.

This module will allow an administrator to easily configure the options she wants to run php5-cgi with and create the upstart job with minimal effort and wasted time.

Compatibility

This module has only been tested in Ubuntu 12.04.

This module requires upstart in order to properly function.

Basic usage

To install and run php5-cgi as an upstart job with sensible defaults.

include php_fastcgi

It is also possible to call php_fastcgi as a paramterized class in order to modify default settings.

class {'php_fastcgi': 
  user  => 'www-data',
  group => 'www-data',
}

Options

All options below can be set as parameters when calling the php_fastcgi class. Their default values are shown next to the option.

User php5-cgi will run as:

user          = 'www-data' 

Group php5-cgi will run as:

group         = 'www-data'

Address php5-cgi will listen on:

address       = '127.0.0.1'

Port php5-cgi will listen on:

port          = '9000'

Number of children instances php5-cgi will spawn:

children      = '1'

Max requests which php5-cgi will accept:

max_requests  = '1000'

Whether or not php-fcgi should start by default:

start         = true

Upstart events which trigger the php-fcgi job:

start_on      = 'filesystem and static-network-up'

If php5-cgi dies, respawn:

respawn       = true

Limit respawning to 10 times in 5 secons:

respawn_limit = '10 5'

Command line options for the php5-cgi command:

options       = '-q -b'

Contributors

License

Copyright (C) 2013 MiMedia Inc.

MiMedia can be contacted at: support@mimedia.com

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.