Forge Home

simple_apache_vhost

This puppet module provisions a single simple Apache vhost in both HTTP and HTTPS modes, enabling pretty URLs and custom base file paths

9,333 downloads

9,132 latest version

2.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.2 (latest)
  • 0.0.1
released May 27th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'JonTheNiceGuy-simple_apache_vhost', '0.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add JonTheNiceGuy-simple_apache_vhost
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install JonTheNiceGuy-simple_apache_vhost --version 0.0.2

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

JonTheNiceGuy/simple_apache_vhost — version 0.0.2 May 27th 2013

#simple_apache_vhost

####Table of Contents

  1. Overview
  2. Module Description
  3. Setup and Usage
  4. License
  5. Support
  6. Limitations
  7. Release Notes

Overview

This puppet module provisions a single simple Apache vhost in both HTTP and HTTPS modes, enabling pretty URLs and custom base file paths.

##Module Description

This puppet module provisions a single simple Apache vhost in both HTTP and HTTPS modes. The provisioned vhost has in-built rewrite rules to point HTTP traffic to the HTTPS site, or to follow the same rules as the HTTPS component. The "default" rewrite rules point all unfound locations to the index.php in the stated path.

##Setup and Usage

What simple_apache_vhost affects:

  • Configuration files and directories (created and written to)
  • Packages, Services and Configuration files
  • Apache Modules
  • Virtual Hosts
  • Listened-to Ports

###Basic Setup

To install simple_apache_vhost with all the default options

class { 'simple_apache_vhost': }

The defaults are determined by your operating system. Currently the only set of default options which have been configured are for the Debian/Ubuntu system, but migration should be very straightforward.

###Non Standard ports

To install simple_apache_vhost with non-standard ports and a provisioned SSL/TLS certificate

class { 'simple_apache_vhost':
  http_port  => '1234',
  https_port => '12345',
  ssl_key    => '/tmp/ssl/key1',
  ssl_pem    => '/tmp/ssl/pem1'
}

###Changing the base path

If you've got a web application (such as Zend or similar) and want to move your normal web path to /var/www/public, you can do this by setting the base_path value. You can also prevent auto-forwarding of traffic from the HTTP service to the HTTPS service by changing the redirect_to_ssl to false.

class { 'simple_apache_vhost':
  base_path       => "/var/www/public",
  redirect_to_ssl => false
}

##License

Copyright (C) 2013 Jon Spriggs

Jon can be contacted at: jon@sprig.gs

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

Please raise issues, changes and pull requests at https://github.com/JonTheNiceGuy/JonTheNiceGuy-simple_apache_vhost

##Limitations

Currently this code only supports Debian and Ubuntu.

##Release Notes

This release note refers to the last release only. For previous notes, please see the commit log

  • This is the initial release