Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_basedir restriction for php-fpm backend #1609

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/v-add-web-domain-backend
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ user=$1
domain=$2
template=${3-default}
restart=$4
docroot="$HOMEDIR/$user/web/$domain/public_html"

# Includes
source $VESTA/func/main.sh
Expand Down Expand Up @@ -59,6 +60,7 @@ cat $WEBTPL/$WEB_BACKEND/$template.tpl |\
sed -e "s|%backend_port%|$backend_port|" \
-e "s|%user%|$user|g"\
-e "s|%domain%|$domain|g"\
-e "s|%docroot%|$docroot|g"\
-e "s|%backend%|$backend_type|g" > $pool/$backend_type.conf


Expand Down
2 changes: 2 additions & 0 deletions bin/v-change-web-domain-backend-tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ domain=$2
domain_idn=$2
template=$3
restart=$4
docroot="$HOMEDIR/$user/web/$domain/public_html"

# Includes
source $VESTA/func/main.sh
Expand Down Expand Up @@ -65,6 +66,7 @@ cat $WEBTPL/$WEB_BACKEND/$template.tpl |\
sed -e "s|%backend_port%|$backend_port|" \
-e "s|%user%|$user|g"\
-e "s|%domain%|$domain|g"\
-e "s|%docroot%|$docroot|g"\
-e "s|%domain_idn%|$domain_idn|"\
-e "s|%backend%|$backend_type|g" > $pool/$backend_type.conf

Expand Down
1 change: 1 addition & 0 deletions install/ubuntu/16.04/templates/web/php-fpm/default.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pm.status_path = /status

php_admin_value[upload_tmp_dir] = /home/%user%/tmp
php_admin_value[session.save_path] = /home/%user%/tmp
php_admin_value[open_basedir] = %docroot%:/home/%user%/tmp

env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
Expand Down