What do you think would be solution to my problem?

user@admin:~$ sudo service apache2 restart
sudo: unable to resolve host admin
* Restarting web server apache2                                                
AH00548: NameVirtualHost has no effect and will be removed in the next release

1 Answer 1


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.

The solution to your problem is to remove the NameVirtualHost directive.

  • 36
    I ran into the same error message after an upgrade, but simply removing the NameVirtualHost directive was not enough to get Apache working again for me. Every request got processed by the default vhost, regardless of IP and host header. Turns out something else had changed during the upgrade as well. The old apache2.conf permitted vhosts whose name did not end with .conf, the new configs silently ignored all such vhosts. Wanted to leave this comment here, such that the next person to run into that hopefully won't have to spend as much time on it, as I did.
    – kasperd
    Aug 9, 2014 at 10:53
  • 6
    be sure to change you conf(s) after removing NameVirtualHost so you have: <VirtualHost *:80>
    – OnePablo
    Oct 1, 2014 at 14:11
  • 1
    As a followup to kasperd's comment, .conf files in sites-available need the .conf extension. I came across this thread while upgrading from Apache 2.2 to 2.4. linode.com/docs/security/upgrading/…
    – wruckie
    Mar 10, 2016 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.