보안상의 이유로open_basedir의 효과 및 하위 도메인 제한
사이트를 실행할 때 xtx51이 index.php
에서 호출 된 yii.php
라는 오류 open_basedir 제한이 발생합니다. 허용 된 경로에 없습니다. 이 사이트는 하위 도메인이므로 기본 도메인 또는 하위 도메인의 vhosts.conf
을 편집합니까?
/var/www/vhosts/example.com/subdomains/mysubdomain/yii
경로에 액세스하려면 올바른 설정은 무엇입니까?
EDIT
그래서 내 /var/www/vhosts/example.com/conf/vhost.conf
파일은 다음과 같이 보입니다 :
AddHandler fcgid-script .php
<Directory /var/www/vhosts/example.com/httpdocs>
php_admin_value open_basedir ".:/var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs:/tmp/:/var/www/vhosts/example.com/subdomains/mysubdomain/yii"
FCGIWrapper /var/www/vhosts/example.com/bin/php-cgi .php
Options +ExecCGI +FollowSymLinks
allow from all
</Directory>
웹 서버를 재구성하고 다시 시작했지만 여전히 오류가 발생합니다 :
Warning: require_once() [function.require-once]: open_basedir restriction in effect.
File(/var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs/../yii/yii.php) is not within the allowed path(s):
(/var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs:/tmp)
in /var/www/vhosts/example.com/subdomains/mysubdomain/httpdocs/index.php on line 26
당신이 볼 않았다 http://us3.php.net/manual/en/ini.core.php # ini.open-basedir? – ldg
은 여전히 문제를 해결하는 데 도움이되는 기사입니다. http://prattski.com/2008/09/13/plesk-open_basedir-fix/ – keeg