FreeBSD: mod_proxy

This commit is contained in:
Alexander Weidinger 2017-01-08 12:03:48 +01:00
parent 9e3645c53c
commit bc81c6ab43
4 changed files with 20 additions and 3 deletions

View File

@ -43,7 +43,7 @@ Enabled the Apache module mod_rewrite (Debian only)
``apache.mod_proxy``
-------------------
Enables the Apache module mod_proxy. (Debian only)
Enables the Apache module mod_proxy. (Debian and FreeBSD only)
``apache.mod_proxy_http``
-------------------------

View File

@ -1,4 +1,6 @@
LoadModule php5_module /usr/local/libexec/apache24/libphp5.so
{% from "apache/map.jinja" import apache with context %}
LoadModule php5_module /usr/local/libexec/{{ apache.service }}/libphp5.so
DirectoryIndex index.html index.php

View File

@ -0,0 +1,3 @@
{% from "apache/map.jinja" import apache with context %}
LoadModule proxy_module libexec/{{ apache.service }}/mod_proxy.so

View File

@ -1,8 +1,9 @@
{% if grains['os_family']=="Debian" %}
{% from "apache/map.jinja" import apache with context %}
include:
- apache
{% if grains['os_family']=="Debian" %}
a2enmod mod_proxy:
cmd.run:
- name: a2enmod proxy
@ -13,4 +14,15 @@ a2enmod mod_proxy:
- watch_in:
- module: apache-restart
{% elif grains['os_family']=="FreeBSD" %}
{{ apache.modulesdir }}/040_mod_proxy.conf:
file.managed:
- source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_proxy.conf.jinja
- mode: 644
- template: jinja
- require:
- pkg: apache
- watch_in:
- module: apache-restart
{% endif %}