码迷,mamicode.com
首页 > Web开发 > 详细

Apache2.4.6添加虚拟主机提示:NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/extra/httpd-vhosts.conf

时间:2016-07-14 13:19:26      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:

[root@localhost conf]# service httpd restart
停止 httpd:                                               [确定]
启动 httpd:AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/extra/httpd-vhosts.conf:1

文件 /usr/local/apache/conf/extra/httpd-vhosts.conf 的内容如下:

NameVirtualHost *:80
<virtualhost *:80>
	ServerName www.example.com
	DocumentRoot /var/www
	DirectoryIndex index.html index.php
	<Directory /var/www>
		Options +Includes -Indexes
		AllowOverride All
		Order Deny,Allow
		Allow from All
		php_admin_value open_basedir /var/www:/tmp:/proc
	</Directory>
</virtualhost>

Include conf/vhost/*

提示很明显 NameVirtualHost 已经无效(指的是Apache2.4.x版本),所以配置虚拟主机时不需要设置 NameVirtualHost,把上面的 “NameVirtualHost *:80” 删除掉,问题解决!

Apache2.4.6添加虚拟主机提示:NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/extra/httpd-vhosts.conf

标签:

原文地址:http://www.cnblogs.com/52php/p/5669919.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!