David David - 3 months ago 8
Apache Configuration Question

NameVirtualHost has no effect and will be removed in the next release

I have got a problem with restart httpd service on my server.

When I try

service httpd restart
, it will give me an error:

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


I don't really understand what I get an error when i try to restart the httpd service.

Can you please tell me what I have to do to correct the problem?

P.S I need to set the setting correctly in the httpd.conf as I need the rewrite rules to work correctly as it did not work when I try to use
RewriteCond %{HTTP_HOST} ^google
as it wont do anything to mask the domain name to my domain name.

Answer

The error instructs you to look at line 455 in /usr/local/apache/conf/httpd.conf. That line likely starts with NameVirtualHost, which is no longer necessary. But it is a warning, not an error. Also take a look in the logs (your configuration appears not standard; check in /var/log for the httpd logs).