Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache error: _default_ virtualhost overlap on port 443

I get this error when trying to start Apache.

_default_ virtualhost overlap on port 443

I'm trying to set up SSL. Almost every solution online says add:

NameVirtualHost *:443 

to the conf file but Apache still fails to start and just says

Action start failed. the apache logs may have more information

There is zero information in the Apache logs.

like image 683
Mark Avatar asked May 18 '12 18:05

Mark


1 Answers

To resolve the issue on a Debian/Ubuntu system modify the /etc/apache2/ports.conf settings file by adding NameVirtualHost *:443 to it. My ports.conf is the following at the moment:

# /etc/apache/ports.conf # If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in # /etc/apache2/sites-enabled/000-default # This is also true if you have upgraded from before 2.2.9-3 (i.e. from # Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and # README.Debian.gz  NameVirtualHost *:80 Listen 80  <IfModule mod_ssl.c>     # If you add NameVirtualHost *:443 here, you will also have to change     # the VirtualHost statement in /etc/apache2/sites-available/default-ssl     # to <VirtualHost *:443>     # Server Name Indication for SSL named virtual hosts is currently not     # supported by MSIE on Windows XP.      NameVirtualHost *:443      Listen 443 </IfModule>  <IfModule mod_gnutls.c>     NameVirtualHost *:443     Listen 443 </IfModule> 

Furthermore ensure that 'sites-available/default-ssl' is not enabled, type a2dissite default-ssl to disable the site. While you're at it type a2dissite by itself to get a list and see if there is any other site settings that you have enabled that might be mapping onto port 443.

like image 102
Daniel Sokolowski Avatar answered Sep 19 '22 20:09

Daniel Sokolowski