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

Quesion:
Recently, using Apache 2.4 i got the error message "NameVirtualHost has no effect and will be removed in the next release". Can you explain this?

Answer:
From the apache documentation:

Prior to 2.3.11, NameVirtualHost was required to instruct the server that a particular IP address and port combination was usable as a name-based virtual host. In 2.3.11 and later, any time an IP address and port combination is used in multiple virtual hosts, name-based virtual hosting is automatically enabled for that address.

This directive currently has no effect.

So, you need to remove the NameVirtualHost directive from Apache conf to fix this issue.

Labels: ,