我在服务器上重新启动httpd服务时遇到问题。
当我尝试service httpd restart
时,它会给我一个错误:
root@server1 [/usr/src]# service httpd restart
AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/httpd.conf:455
当我尝试重新启动httpd服务时,我不太明白出现了什么错误。
您能告诉我纠正该问题该怎么做吗?
P.S我需要在httpd.conf中正确设置设置,因为我需要重写规则才能正常工作,因为当我尝试使用
RewriteCond %{HTTP_HOST} ^google
时它无法正常工作,因为它不会做任何将域名掩盖为我的域名的操作。
最佳答案
该错误指示您查看/usr/local/apache/conf/httpd.conf
中的455行。该行可能以NameVirtualHost
开头,不再需要。但这是警告,而不是错误。还可以查看日志(您的配置似乎不标准;请在/var/log
中查看httpd日志)。
关于apache - NameVirtualHost无效,将在下一版本中删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34701809/