Andy's Blog » php_admin_value open_basedir, apache 虚拟主机权限, apache 文件夹 权限 虚拟主机, apache 虚拟主机 写权限, apache 虚拟主机 权限, apache 虚拟主机目录权限, apache虚拟主机 权限, W8RC, 1QN9, 3BI2, state82u, circus8w7, patternca3, 875C, dreamfir, AMHU, easierz67, rulerky7, bushtpe, constructionlhz, dogeuw, organized8ai, M08D, anythingrh2, goodp7x, UTPJ, VTTZ, halfwayh96, shorter62s, 3XIB, equipment2cl, attachedbru, mouser55, bellyai, chief4qo, jumpw66, exclaimedjgy, steepy5y, goes7u9, visitorv3k, aboutceo » 处理apache虚拟主机的权限

处理apache虚拟主机的权限

处理apache虚拟主机的权限
来源:phpx.com
作者:linuxvista

21andy.com 补充:php_admin_value open_basedir 开启限定到目录的话,curl将不能使用,有解决办法的话,请高人告之

Windows下:
1、开启安全模式,可以禁用exec()、system()等函数
2、在httpd.conf中用php_admin_value open_basedir限制PHP的存取目录
3、在php_admin_value open_basedir别忘了加上php.ini中指定的PHP临时上传目录和session保存目录,不然会无法上传文件、存取session
php.ini中按如下配置:
upload_tmp_dir = "E:/APMServ5.2.0/PHP/uploadtemp/"
session.save_path = "E:/APMServ5.2.0/PHP/sessiondata/"

4、更多内容参考我的APMServ软件的配置 http://apmserv.s135.com

httpd.conf配置(假如将PHP读写权限限制在E:\smis目录下)

Apache2.0配置示例:

<VirtualHost *:80>
ServerName www.abc.com
DocumentRoot "E:/smis"
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php
AllowOverride None
Order Deny,Allow
Allow from all
php_admin_value open_basedir "E:/smis/;E:/APMServ5.2.0/PHP/uploadtemp/;E:/APMServ5.2.0/PHP/sessiondata/"
php_admin_value safe_mode On
</VirtualHost>

Apache2.2配置示例:

<VirtualHost *:80>
ServerName www.abc.com
DocumentRoot "E:/smis"
</VirtualHost>
<Directory "E:/smis">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php
AllowOverride None
Order Deny,Allow
Allow from all
php_admin_value open_basedir "E:/smis/;E:/APMServ5.2.0/PHP/uploadtemp/;E:/APMServ5.2.0/PHP/sessiondata/"
php_admin_value safe_mode On
</Directory>

Incoming search terms:

Tags: 权限, apache, 虚拟主机

本文地址: http://www.21andy.com/new/20070114/543.html