[root@localhost conf]# service httpd restart停止 httpd: [确定]启动 httpd:AH00548: NameVirtualHost has no effect and will be removed in the next release ...

[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” 删除掉,问题解决!
原文:http://www.cnblogs.com/52php/p/5669919.html
本文标题为:Apache2.4.6添加虚拟主机提示:NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/extra/httpd-vhosts.conf


基础教程推荐
- P3 利用Vulnhub复现漏洞 - Apache SSI 远程命令执行漏洞 2023-09-10
- 通过StatefulSet部署有状态服务应用实现方式 2022-10-01
- Docker容器操作方法详解 2022-11-13
- Centos 安装Django2.1 2023-09-24
- 为Win2003服务器打造铜墙铁壁的方法步骤 2022-09-01
- Apache CarbonData 1.0.0发布及其新特性介绍 2023-09-11
- Centos7 nginx的安装以及开机自启动的设置 2023-09-22
- Apache Kafka 2.5 稳定版发布,新特性抢先看 2023-09-11
- RFO SIG之openEuler AWS AMI 制作详解 2022-12-28
- windows环境下apache-apollo服务器搭建 2023-09-10