2
0

mise au point atelier condition

This commit is contained in:
2020-05-07 15:41:26 +02:00
parent caf04a0af4
commit 719f513f16
19 changed files with 60 additions and 151 deletions

View File

@@ -12,7 +12,7 @@ None
Role Variables
--------------
apache_user_php - default False
http_port: 80
servername: orsys.fr
serveralias: "www.{{ servername }}"

View File

@@ -1,2 +1,4 @@
---
# defaults file for myapache
# defaults file for myapache
http_port: 80
use_php: false

View File

@@ -0,0 +1,2 @@
<?php
echo phpinfo() ;

View File

@@ -51,4 +51,8 @@
dest: "{{ item.documentroot }}/index.html"
mode: 0644
with_items:
- "{{ apache_vhosts }}"
- "{{ apache_vhosts }}"
- name: include php stuff
include_tasks: php.yml
when: use_php

View File

@@ -0,0 +1,20 @@
---
- name: install php-fpm
yum:
name: php-fpm
state: present
- name: start php-fpm
service:
name: php-fpm
state: started
enabled: true
- name: create info file
copy:
src: info.php
dest: "{{ item.documentroot }}/info.php"
mode: 0644
with_items:
- "{{ apache_vhosts }}"

View File

@@ -10,6 +10,11 @@
Allowoverride none
Require all denied
</Directory>
{% if use_php %}
<FilesMatch \.php$>
SetHandler proxy:fcgi://localhost:9000
</FilesMatch>
{% endif %}
<Directory {{ vhost.documentroot }}>
Options {{ vhost.documentrootoptions|default( "none" ) }}