• 搜索: ???
?
?
Apache2.4.6需不需要配置NameVirtualHost? - Tomcat

时间:2018-09-27

最近在安装完LAMP环境后,Apache的vhosts.conf文件里追加了站点。
NameVirtualHost *:80

??? ServerName www.eyunpos.com
??? DocumentRoot /var/www/www.eyunpos.com
??? DirectoryIndex index.html index.php
???
??????? Options +Includes -Indexes
??????? AllowOverride All
??????? Order Deny,Allow
??????? Allow from All
??

用httpd命令测试一下。

# httpd -t
ZABBIX.CC: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf.d/vhosts.conf:1
Syntax OK

虽然Syntax Ok了,但提示NameVirtualHost已经无效,查阅后才知在下一个版本不在支持NameVitualHost。

好吧,删除NameVirtualHost*:80以后,再次测试结果OK。

# httpd -t
Syntax OK

1

?