FreeBSD: mod_rewrite
This commit is contained in:
parent
5dbe687cda
commit
f03df6e2fb
@ -38,7 +38,7 @@ Enables and disables Apache modules.
|
||||
``apache.mod_rewrite``
|
||||
----------------------
|
||||
|
||||
Enabled the Apache module mod_rewrite (Debian only)
|
||||
Enabled the Apache module mod_rewrite (Debian and FreeBSD only)
|
||||
|
||||
``apache.mod_proxy``
|
||||
-------------------
|
||||
|
3
apache/files/FreeBSD/mod_rewrite.conf.jinja
Normal file
3
apache/files/FreeBSD/mod_rewrite.conf.jinja
Normal file
@ -0,0 +1,3 @@
|
||||
{% from "apache/map.jinja" import apache with context %}
|
||||
|
||||
LoadModule rewrite_module libexec/{{ apache.service }}/mod_rewrite.so
|
@ -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 rewrite:
|
||||
cmd.run:
|
||||
- unless: ls /etc/apache2/mods-enabled/rewrite.load
|
||||
@ -12,4 +13,16 @@ a2enmod rewrite:
|
||||
- watch_in:
|
||||
- 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 %}
|
||||
|
Loading…
Reference in New Issue
Block a user