forked from saltstack-formulas/apache-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
133 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% from "apache/map.jinja" import apache with context %} | ||
include: | ||
- apache | ||
- apache.mod_actions | ||
{% if grains['os_family']=="Debian" %} | ||
mod-fastcgi: | ||
pkg.installed: | ||
- name: {{ apache.mod_fastcgi }} | ||
- order: 180 | ||
- require: | ||
- pkgrepo: repo-fastcgi | ||
- pkg: apache | ||
repo-fastcgi: | ||
pkgrepo.managed: | ||
- name: "deb http://httpredir.debian.org/debian jessie" | ||
- file: /etc/apt/sources.list.d/non-free.list | ||
- comps: non-free | ||
a2enmod fastcgi: | ||
cmd.run: | ||
- unless: ls /etc/apache2/mods-enabled/fastcgi.load | ||
- order: 225 | ||
- require: | ||
- pkg: mod-fastcgi | ||
- watch_in: | ||
- module: apache-restart | ||
{% endif %} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% if grains['os_family']=="Debian" %} | ||
|
||
include: | ||
- apache | ||
- apache.mod_proxy | ||
|
||
a2enmod proxy_fcgi: | ||
cmd.run: | ||
- unless: ls /etc/apache2/mods-enabled/proxy_fcgi.load | ||
- order: 225 | ||
- require: | ||
- pkg: apache | ||
- cmd: a2enmod proxy | ||
- watch_in: | ||
- module: apache-restart | ||
|
||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% from "apache/map.jinja" import apache with context %} | ||
include: | ||
- apache | ||
mod-xsendfile: | ||
pkg.installed: | ||
- name: {{ apache.mod_xsendfile }} | ||
- order: 180 | ||
- require: | ||
- pkg: apache | ||
{% if grains['os_family']=="Debian" %} | ||
a2enmod xsendfile: | ||
cmd.run: | ||
- order: 225 | ||
- unless: ls /etc/apache2/mods-enabled/xsendfile.load | ||
- require: | ||
- pkg: mod-xsendfile | ||
- watch_in: | ||
- module: apache-restart | ||
{% endif %} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{# Define default values here so the template below can just focus on layout #} | ||
{%- set sitename = site.get('ServerName', id) -%} | ||
|
||
{%- set vals = { | ||
'interfaces': site.get('interface', '*').split(), | ||
'port': site.get('port', '80'), | ||
|
||
'ServerName': sitename, | ||
'ServerAlias': site.get('ServerAlias', 'www.{0}'.format(sitename)), | ||
|
||
'ServerAdmin': site.get('ServerAdmin', 'webmaster@{0}'.format(sitename)), | ||
|
||
'LogLevel': site.get('LogLevel', 'warn'), | ||
'ErrorLog': site.get('ErrorLog', '{0}/{1}-error.log'.format(map.logdir, sitename)), | ||
'CustomLog': site.get('CustomLog', '{0}/{1}-access.log'.format(map.logdir, sitename)), | ||
|
||
'DocumentRoot': site.get('DocumentRoot', '{0}/{1}'.format(map.wwwdir, sitename)) | ||
} -%} | ||
|
||
<VirtualHost {% for intf in vals.interfaces %} {{intf}}:{{ vals.port }}{% endfor -%}> | ||
ServerName {{ vals.ServerName }} | ||
{% if site.get('ServerAlias') != False %}ServerAlias {{ vals.ServerAlias }}{% endif %} | ||
{% if site.get('ServerAdmin') != False %}ServerAdmin {{ vals.ServerAdmin }}{% endif %} | ||
|
||
{% if site.get('DocumentRoot') != False -%}DocumentRoot {{ vals.DocumentRoot }}{% endif %} | ||
|
||
{% if site.get('LogLevel') != False -%}LogLevel {{ vals.LogLevel }}{% endif %} | ||
{% if site.get('ErrorLog') != False -%}ErrorLog {{ vals.ErrorLog }}{% endif %} | ||
{% if site.get('CustomLog') != False -%}CustomLog {{ vals.CustomLog }} {{ vals.LogFormat }}{% endif %} | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters