PHP works on FreeBSD
parent
8edd69547d
commit
c13cb0d770
|
@ -14,11 +14,20 @@
|
||||||
- sites-available
|
- sites-available
|
||||||
- sites-enabled
|
- sites-enabled
|
||||||
|
|
||||||
- name: FILE | Follow Debian ;)
|
- name: STAT | Check fastcgi.conf
|
||||||
file: >
|
stat: path={{ nginx_etc_dir }}/fastcgi.conf
|
||||||
src="{{ nginx_etc_dir }}/fastcgi_params"
|
register: conf
|
||||||
|
|
||||||
|
- name: COPY | config
|
||||||
|
command: "cp {{ nginx_etc_dir }}/fastcgi_params {{ nginx_etc_dir }}/fastcgi.conf"
|
||||||
|
when: not conf.stat.exists
|
||||||
|
notify: reload nginx
|
||||||
|
|
||||||
|
- name: LINEINFILE | Add fastcgi config
|
||||||
|
lineinfile: >
|
||||||
|
line="fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;"
|
||||||
dest="{{ nginx_etc_dir }}/fastcgi.conf"
|
dest="{{ nginx_etc_dir }}/fastcgi.conf"
|
||||||
state=link
|
notify: reload nginx
|
||||||
|
|
||||||
- name: COPY | Populate proxy_params
|
- name: COPY | Populate proxy_params
|
||||||
copy: >
|
copy: >
|
||||||
|
|
|
@ -3,3 +3,20 @@
|
||||||
- name: SET_FACT | FreeBSD web user
|
- name: SET_FACT | FreeBSD web user
|
||||||
set_fact:
|
set_fact:
|
||||||
nginx_user: 'www'
|
nginx_user: 'www'
|
||||||
|
nginx_php_sockets:
|
||||||
|
- host: '127.0.0.1'
|
||||||
|
port: 9000
|
||||||
|
|
||||||
|
- name: PKGNG | Install needed packages
|
||||||
|
pkgng: pkg={{ item }} state=present
|
||||||
|
with_items:
|
||||||
|
- php56
|
||||||
|
- curl
|
||||||
|
- fcgiwrap
|
||||||
|
|
||||||
|
- name: SERVICE | Force start services
|
||||||
|
service: name={{ item }} state=started enabled=yes
|
||||||
|
register: sf
|
||||||
|
with_items:
|
||||||
|
- php-fpm
|
||||||
|
- fcgiwrap
|
||||||
|
|
|
@ -141,6 +141,8 @@
|
||||||
redirect_from:
|
redirect_from:
|
||||||
- 'www.test-php.local'
|
- 'www.test-php.local'
|
||||||
template: '_php'
|
template: '_php'
|
||||||
|
use_error_log: true
|
||||||
|
use_access_log: true
|
||||||
- name: 'test-php-index.local'
|
- name: 'test-php-index.local'
|
||||||
template: '_php_index'
|
template: '_php_index'
|
||||||
- name: 'test-proxy.local'
|
- name: 'test-proxy.local'
|
||||||
|
|
Loading…
Reference in New Issue