- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with sc_apache
- Usage - Configuration options and additional functionality
ScaleCommerce Wrapper Module for puppetlabs-apache. Manages Supervisord, vhosts, OPCache, ZendGuard Loader, IonCube.
This module uses hiera to configure Apache ressources.
- apache
- apache modules
- supervisord
- ZendGuard Loader
- PHP OPCache
- IonCube Loader
- Local vhosts for monitoring
You will need a working hiera-Setup (https://docs.puppetlabs.com/hiera/3.1/complete_example.html).
Check out our solultion for Puppet-Hiera-Roles (https://github.com/ScaleCommerce/puppet-hiera-roles).
Put this into your node.yaml or role.yaml. See Documentation of puppetlabs-apache for details on vhost syntax.
---
classes:
- sc_apache
sc_apache::vhosts:
# Default vhost matches all servernames which are not configured in any vhost
default:
docroot: /var/www/catchall/web
default_vhost: true
# other vhosts
www.example.com:
server_aliases: ['example.com']
docroot: /var/www/www.example.com/web
override: ['All']
# add php.ini settings per vhost
www.domain.de:
server_aliases: ['deomain.de']
docroot: /var/www/www.domain.de/web
override: ['All']
php_values:
tideways.api_key: 'xxx'
tideways.framework: 'shopware'
sc_apache::modules:
- rewrite
- auth_basic
- deflate
- expires
- headers
- remoteip
- status
- authz_user
- authz_groupfile
- alias
- authn_core
- authn_file
- reqtimeout
- negotiation
- autoindex
- access_compat
- env
classes:
- sc_apache
- sc_apache::php
- sc_apache::tideways
- sc_apache::zendopcache # this class installs zendopcache in php 5.4
- sc_apache::ioncube
- sc_apache::zendguard
sc_apache::php::major_version: '5.6'
sc_apache::php::ini_settings:
apache2:
session.gc_maxlifetime: 604800
error_reporting: "E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE"
max_execution_time: 60
cli:
max_execution_time: 1200
sc_apache::php::modules:
- mysql
- gd
- mcrypt
- curl
- intl
- xsl
When making changes you can test this module locally with gitlab-runner on Mac OSX
gitlab-runner exec docker --env "GIT_STRATEGY=none" --docker-volumes
pwd:/builds/project-0 xenial:7.2:puppet5