Apache shows error “VirtualHost *:80 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

If Apache shows the error:

it means that your VirtualHost sections are not matching the NameVirtualHost directive in your configuration.

To fix this follow these steps:

  • Locate the directive NameVirtualHost, by default it should be something like: NameVirtualHost *:80

  • Look at your VirtualHost declarations, they should match the NameVirtualHost, so they should be something like <VirtualHost *:80>

Alternatively, you can add new NameVirtualHost to match the additional VirtualHost sections.

You can restart Apache in the control panel under Applications > Apache or via command line with service httpd restart in CentOS or service apache2 restart in Ubuntu.

Information on how to restart Apapche in CentOs can be found here.