Commit c17d3283 authored by Matthieu FAURE's avatar Matthieu FAURE
Browse files

FEAT Simplify custom_fragment + add PHP extensions

parent f8d27fcf
......@@ -3,12 +3,10 @@ $apache_port = 80
$apache_docroot = '/var/www/html'
$apache_default_vhost = true
$php_version = '7.2'
$fastcgi_socket = 'fcgi://127.0.0.1:9000'
$_my_custom_fragment = @(END)
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>
END
# See https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html#examples
$_my_custom_fragment = "ProxyPassMatch ^/(.*\\.php)\$ ${fastcgi_socket}${apache_docroot}/ enablereuse=on"
$_phpinfo = "${apache_docroot}/t.php"
......@@ -27,33 +25,29 @@ apache::vhost { $apache_hostname:
custom_fragment => $_my_custom_fragment,
}
include php
# class { 'php::globals':
# php_version => '7.2',
# }
# -> class { 'php':
# manage_repos => true,
# dev => true, # à tester
# extensions => {
# ctype => {},
# # curl => {},
# # dom => {},
# # gd => {},
# # iconv => {},
# # json => {},
# # libxml => {},
# # mbstring => {},
# # openssl => {},
# # posix => {},
# # session => {},
# # simplexml => {},
# # xmlreader => {},
# # xmlwriter => {},
# # zip => {},
# # zlib => {},
# },
# }
class { 'php::globals':
php_version => '7.2',
}
-> class { 'php':
extensions => {
ctype => {},
curl => {},
dom => {},
gd => {},
iconv => {},
json => {},
# libxml => {}, # already installed
mbstring => {},
# openssl => {}, # already installed
posix => {},
# session => {}, # already installed
simplexml => {},
xmlreader => {},
xmlwriter => {},
zip => {},
# zlib => {}, # already installed
},
}
file { 't.php':
path => $_phpinfo,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment