Browse Source

FreeBSD: mod_rewrite

master
Alexander Weidinger 8 years ago
parent
commit
f03df6e2fb
3 changed files with 18 additions and 2 deletions
  1. +1
    -1
      README.rst
  2. +3
    -0
      apache/files/FreeBSD/mod_rewrite.conf.jinja
  3. +14
    -1
      apache/mod_rewrite.sls

+ 1
- 1
README.rst View File

``apache.mod_rewrite`` ``apache.mod_rewrite``
---------------------- ----------------------


Enabled the Apache module mod_rewrite (Debian only)
Enabled the Apache module mod_rewrite (Debian and FreeBSD only)


``apache.mod_proxy`` ``apache.mod_proxy``
------------------- -------------------

+ 3
- 0
apache/files/FreeBSD/mod_rewrite.conf.jinja View File

{% from "apache/map.jinja" import apache with context %}

LoadModule rewrite_module libexec/{{ apache.service }}/mod_rewrite.so

+ 14
- 1
apache/mod_rewrite.sls View File

{% if grains['os_family']=="Debian" %}
{% from "apache/map.jinja" import apache with context %}


include: include:
- apache - apache


{% if grains['os_family']=="Debian" %}
a2enmod rewrite: a2enmod rewrite:
cmd.run: cmd.run:
- unless: ls /etc/apache2/mods-enabled/rewrite.load - unless: ls /etc/apache2/mods-enabled/rewrite.load
- watch_in: - watch_in:
- module: apache-restart - module: apache-restart


{% elif grains['os_family']=="FreeBSD" %}

{{ apache.modulesdir }}/040_mod_rewrite.conf:
file.managed:
- source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_rewrite.conf.jinja
- mode: 644
- template: jinja
- require:
- pkg: apache
- watch_in:
- module: apache-restart

{% endif %} {% endif %}

Loading…
Cancel
Save