Browse Source

mod_php5: FreeBSD

master
Alexander Weidinger 8 years ago
parent
commit
9a1fb054d6
3 changed files with 23 additions and 0 deletions
  1. +10
    -0
      apache/files/FreeBSD/mod_php5.conf.jinja
  2. +1
    -0
      apache/map.jinja
  3. +12
    -0
      apache/mod_php5.sls

+ 10
- 0
apache/files/FreeBSD/mod_php5.conf.jinja View File

@@ -0,0 +1,10 @@
LoadModule php5_module /usr/local/libexec/apache24/libphp5.so

DirectoryIndex index.html index.php

<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>

+ 1
- 0
apache/map.jinja View File

@@ -85,6 +85,7 @@
'configfile': '/usr/local/etc/apache22/httpd.conf',
'portsfile': '/usr/local/etc/apache22/ports.conf',

'mod_php5': 'mod_php56',
'mod_wsgi': 'ap22-mod_wsgi3',

'vhostdir': '/usr/local/etc/apache22/Includes',

+ 12
- 0
apache/mod_php5.sls View File

@@ -32,4 +32,16 @@ a2enmod php5:
- pkg: mod-php5
{% endif %}

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

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

{% endif %}

Loading…
Cancel
Save