Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Adullact
vagrant-nextcloud
Commits
f8d27fcf
Commit
f8d27fcf
authored
Oct 01, 2019
by
Matthieu FAURE
Browse files
FEAT Configure a functional Apache config with PHP-FPM
parent
8f16b0c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
manifests/default.pp
View file @
f8d27fcf
$my_hostname
=
'nextcloud.example.org'
$my_docroot
=
'/var/www/html'
$fastcgi_socket
=
'fcgi://127.0.0.1:9000'
$apache_hostname
=
'nextcloud.example.org'
$apache_port
=
80
$apache_docroot
=
'/var/www/html'
$apache_default_vhost
=
true
$php_version
=
'7.2'
$_my_custom_fragment
=
@
(
END
)
<
FilesMatch
\
.
php
$
>
SetHandler
"proxy:fcgi://127.0.0.1:9000"
</
FilesMatch
>
END
$_phpinfo
=
"
${apache_docroot}
/t.php"
class
{
'apache'
:
default_vhost
=>
false
,
default_ssl_vhost
=>
false
,
}
class
{
'apache::mod::proxy'
:
}
class
{
'apache::mod::proxy_fcgi'
:
}
apache::vhost
{
$my_hostname
:
docroot
=>
$my_docroot
,
port
=>
80
,
apache::vhost
{
$apache_hostname
:
docroot
=>
$apache_docroot
,
default_vhost
=>
$apache_default_vhost
,
port
=>
$apache_port
,
override
=>
'all'
,
default_vhost
=>
true
,
custom_fragment
=>
"ProxyPassMatch ^/(.*
\\
.php)
\$
${fastcgi_socket}${my_docroot}
\$
1"
,
custom_fragment
=>
$_my_custom_fragment
,
}
class
{
'php::globals'
:
php_version
=>
'7.2'
,
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 => {},
# },
# }
file
{
't.php'
:
path
=>
$_phpinfo
,
ensure
=>
file
,
owner
=>
'www-data'
,
mode
=>
'0644'
,
}
file_line
{
'phpinfo'
:
path
=>
$_phpinfo
,
line
=>
'<?php phpinfo(); ?>'
,
}
->
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 => {},
},
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment