Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
add36e9a
Commit
add36e9a
authored
Sep 19, 2011
by
Falko Timme
Browse files
- Added open_basedir support to PHP-FPM.
parent
4ffb51e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
interface/web/admin/templates/server_config_web_edit.htm
View file @
add36e9a
...
...
@@ -89,7 +89,7 @@
<label
for=
"php_ini_path_apache"
>
{tmpl_var name='php_ini_path_apache_txt'}
</label>
<input
name=
"php_ini_path_apache"
id=
"php_ini_path_apache"
value=
"{tmpl_var name='php_ini_path_apache'}"
size=
"40"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
</div>
<div
class=
"ctrlHolder"
>
<div
class=
"ctrlHolder
apache
"
>
<label
for=
"php_ini_path_cgi"
>
{tmpl_var name='php_ini_path_cgi_txt'}
</label>
<input
name=
"php_ini_path_cgi"
id=
"php_ini_path_cgi"
value=
"{tmpl_var name='php_ini_path_cgi'}"
size=
"40"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
</div>
...
...
server/conf/php_fpm_pool.conf.master
View file @
add36e9a
...
...
@@ -11,4 +11,6 @@ pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
chdir = /
\ No newline at end of file
chdir = /
<tmpl_var name='enable_php_open_basedir'>php_admin_value[open_basedir] = <tmpl_var name='php_open_basedir'>
\ No newline at end of file
server/plugins-available/nginx_plugin.inc.php
View file @
add36e9a
...
...
@@ -640,7 +640,6 @@ class nginx_plugin {
$vhost_data
[
'web_basedir'
]
=
$web_config
[
'website_basedir'
];
$vhost_data
[
'security_level'
]
=
$web_config
[
'security_level'
];
$vhost_data
[
'allow_override'
]
=
(
$data
[
'new'
][
'allow_override'
]
==
''
)
?
'All'
:
$data
[
'new'
][
'allow_override'
];
//$vhost_data['php_open_basedir'] = ($data['new']['php_open_basedir'] == '')?$data['new']['document_root']:$data['new']['php_open_basedir'];
$vhost_data
[
'ssl_domain'
]
=
$data
[
'new'
][
'ssl_domain'
];
//$vhost_data['has_custom_php_ini'] = $has_custom_php_ini;
//$vhost_data['custom_php_ini_dir'] = escapeshellcmd($custom_php_ini_dir);
...
...
@@ -1082,6 +1081,13 @@ class nginx_plugin {
$tpl
->
setVar
(
'fpm_port'
,
$web_config
[
'php_fpm_start_port'
]
+
$data
[
'new'
][
'domain_id'
]);
$tpl
->
setVar
(
'fpm_user'
,
$data
[
'new'
][
'system_user'
]);
$tpl
->
setVar
(
'fpm_group'
,
$data
[
'new'
][
'system_group'
]);
$php_open_basedir
=
(
$data
[
'new'
][
'php_open_basedir'
]
==
''
)
?
$data
[
'new'
][
'document_root'
]
:
$data
[
'new'
][
'php_open_basedir'
];
$tpl
->
setVar
(
'php_open_basedir'
,
$php_open_basedir
);
if
(
$php_open_basedir
!=
''
){
$tpl
->
setVar
(
'enable_php_open_basedir'
,
''
);
}
else
{
$tpl
->
setVar
(
'enable_php_open_basedir'
,
';'
);
}
file_put_contents
(
$pool_dir
.
'/'
.
$data
[
'new'
][
'domain'
]
.
'.conf'
,
$tpl
->
grab
());
$app
->
log
(
'Writing the PHP-FPM config file: '
.
$pool_dir
.
'/'
.
$data
[
'new'
][
'domain'
]
.
'.conf'
,
LOGLEVEL_DEBUG
);
...
...
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