php虚拟主机配置 权限
2013-04-23 00:30
465 查看
httpd.conf
打开Include conf/extra/httpd-vhosts.conf
在其httpd-vhosts.conf中配置虚拟目录
<VirtualHost *:80>
ServerAdmin www.xxhong.com
DocumentRoot D:/dev/php/Apache2.2/htdocs/xxhong
</VirtualHost>
目录配置
如果不配置某个目录,则走默认的目录配置
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
若配置了,则走此
<Directory "D:/dev/php/Apache2.2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
</Directory>
放到虚拟主机配置文件中
httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin ecshop.xxhong.com
DocumentRoot D:/dev/php/www/ecshop
<Directory "D:/dev/php/www">
Allow from all
</Directory>
</VirtualHost>
分部式配置
.htaccess 当前目录 及子目录
<VirtualHost *:80>
ServerAdmin ecshop.xxhong.com
DocumentRoot D:/dev/php/www/ecshop
<Directory "D:/dev/php/www">
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
打开Include conf/extra/httpd-vhosts.conf
在其httpd-vhosts.conf中配置虚拟目录
<VirtualHost *:80>
ServerAdmin www.xxhong.com
DocumentRoot D:/dev/php/Apache2.2/htdocs/xxhong
</VirtualHost>
目录配置
如果不配置某个目录,则走默认的目录配置
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
若配置了,则走此
<Directory "D:/dev/php/Apache2.2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
</Directory>
放到虚拟主机配置文件中
httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin ecshop.xxhong.com
DocumentRoot D:/dev/php/www/ecshop
<Directory "D:/dev/php/www">
Allow from all
</Directory>
</VirtualHost>
分部式配置
.htaccess 当前目录 及子目录
<VirtualHost *:80>
ServerAdmin ecshop.xxhong.com
DocumentRoot D:/dev/php/www/ecshop
<Directory "D:/dev/php/www">
Allow from all
AllowOverride All
</Directory>
</VirtualHost>
相关文章推荐
- php虚拟主机配置、访问权限配置、分布式文件配置
- php与apache的集成、配置虚拟目录、配置虚拟主机
- PHP中级篇:Apache配置httpd-vhosts虚拟主机总结及注意事项【OK】
- PHP中级篇 Apache配置httpd-vhosts虚拟主机总结及注意事项[OK]
- PHP入门-配置虚拟主机
- PHP中级篇 Apache配置httpd-vhosts虚拟主机总结及注意事项[OK]
- php虚拟主机的配置
- 再谈Asp.NET虚拟主机的权限配置!(转载)
- 【CentOS】Apache多虚拟主机多版本PHP(5.3+5.6+N)共存运行配置全过程
- ubuntu下apache&php&虚拟主机开发环境配置
- Apache多虚拟主机多版本PHP(5.2+5.3+5.4)共存运行配置全过程
- 关于Nginx+PHP的虚拟主机目录权限控制的探究
- linux的Apache(http)与PHP的结合配置及Apache默认虚拟主机
- Aapche+Resin+PHP+Mysql+Proftpd虚拟主机配置过程
- php虚拟主机的配置
- centos下php安装pear模块并配置虚拟主机支持Pear模块
- php虚拟主机的配置
- 关于php虚拟主机的配置
- PHP虚拟主机服务器下的文件夹功能和权限说明
- IIS虚拟主机网站防木马权限设置安全配置整理