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
mahogony
php
Commits
03eafe54
Commit
03eafe54
authored
Jun 26, 2016
by
mh
Browse files
enforce our best practice for apc settings for all phps
parent
c992fe29
Changes
4
Hide whitespace changes
Inline
Side-by-side
manifests/apc.pp
View file @
03eafe54
...
...
@@ -4,9 +4,12 @@ class php::apc {
package
{
'php-pecl-apcu'
:
ensure
=>
installed
,
}
$settings_path
=
'/etc/php.d/apcu.ini'
}
else
{
package
{
'php-pecl-apc'
:
ensure
=>
installed
,
}
$settings_path
=
'/etc/php.d/apc.ini'
}
php::apc::settings
{
$settings_path
:
}
}
manifests/apc/base.pp
0 → 100644
View file @
03eafe54
# some default stuff for apc
class
php::apc::base
(
$dir
=
'/var/www/apc_tmp'
,
){
Package
<|
title
==
'apache'
|>
->
file
{
$dir
:
ensure
=>
directory
,
owner
=>
root
,
gropup
=>
0
,
mode
=>
'1777'
,
}
}
manifests/apc/settings.pp
0 → 100644
View file @
03eafe54
# an abstracted way of setting the same options for all
define
php::apc::settings
(){
include
::php::apc::base
augeas
{
"apc_settings_
${name}
"
:
context
=>
"/files
${name}
/.anon"
,
changes
=>
[
# http://chrisgilligan.com/wordpress/how-to-configure-apc-cache-on-virtual-servers-with-php-running-under-fcgid/
'set apc.shm_size 64M'
,
'set apc.ttl 0'
,
"set apc.mmap_file_mask
${php::apc::base::dir}
/apc.XXXXXX"
,
# partially because of http://lists.horde.org/archives/horde/Week-of-Mon-20140414/051263.html
'set apc.enable_cli 1'
,
],
}
}
manifests/scl/phpx.pp
View file @
03eafe54
...
...
@@ -46,4 +46,5 @@ define php::scl::phpx(
notify
=>
Service
[
'apache'
],
}
create_ini_settings
({
''
=>
$php_suhosin_settings
},
$suhosin_defaults
)
php::apc::settings
{
"
${etcdir}
/php.d/apcu.ini"
:
}
}
Write
Preview
Markdown
is supported
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