# _default_ VirtualHost overlap on port 443

## Moriah

I have just gotten www-servers/apache-2.2.6-r7 working as a simple http  webserver.  Next I need to add ssl support.  This is a complete re-install of apache from an older version that worked great.

Now, when I enable SSL and SSL_DEFAULT_VHOST I get the following when I ty to start the server, and the server does not start:

```
eli ~ # /etc/init.d/apache2 start

 * Starting apache2 ...

[Sun Jan 20 21:00:01 2008] [warn] _default_ VirtualHost overlap on port 443, the first has prec  [ !! ]

```

I cannot find anyplace where port 443 is being redefined, other than in 41_mod_ssl.default-vhost.conf where is says:

```
<VirtualHost _default_:443>

#   General setup for the virtual host

DocumentRoot "/var/www/localhost/htdocs"

ServerName localhost:443

```

Does anybody have a clue what could be wrong?

Why is it that every time they come out with a new version of apache, they reorganize the way the config files are put together?  Its really quite annoying.    :Evil or Very Mad: 

----------

## gerdesj

Could you double check the output of:

```
#grep -Ri listen /etc/apache2

#grep -Ri ":443" /etc/apache2
```

Cheers

Jon

----------

## Moriah

Here is the output:

```
eli ~ # grep -Ri listen /etc/apache2

/etc/apache2/httpd.conf.virgin:# Listen: Allows you to bind Apache to specific IP addresses and/or

/etc/apache2/httpd.conf.virgin:# Change this to Listen on specific IP addresses as shown below to 

/etc/apache2/httpd.conf.virgin:#Listen 12.34.56.78:80

/etc/apache2/httpd.conf.virgin:Listen 80

/etc/apache2/vhosts.d/00_default_ssl_vhost.conf:# When we also provide SSL we have to listen to the HTTPS port

/etc/apache2/vhosts.d/00_default_ssl_vhost.conf:# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"

/etc/apache2/vhosts.d/00_default_ssl_vhost.conf:Listen 443

/etc/apache2/vhosts.d/00_default_vhost.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or

/etc/apache2/vhosts.d/00_default_vhost.conf:# Change this to Listen on specific IP addresses as shown below to

/etc/apache2/vhosts.d/00_default_vhost.conf:#Listen 12.34.56.78:80

/etc/apache2/vhosts.d/00_default_vhost.conf:Listen 192.168.2.13:80

eli ~ # 

```

And the other one:

```
eli ~ # grep -Ri ":443" /etc/apache2

/etc/apache2/modules.d/41_mod_ssl.default-vhost.conf:<VirtualHost _default_:443>

/etc/apache2/modules.d/41_mod_ssl.default-vhost.conf:ServerName localhost:443

/etc/apache2/vhosts.d/00_default_ssl_vhost.conf:# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"

/etc/apache2/vhosts.d/00_default_ssl_vhost.conf:<VirtualHost _default_:443>

```

Hmmm...  Why does <VirtualHost _default_:443> appear in both modules.d/41_mod_ssl.default-vhost.conf and vhosts.d/00_default_ssl_vhost.conf?  Which one is where it *REALLY* should  be?

----------

## newtonian

 *Moriah wrote:*   

> 
> 
> Hmmm...  Why does <VirtualHost _default_:443> appear in both modules.d/41_mod_ssl.default-vhost.conf and vhosts.d/00_default_ssl_vhost.conf?  Which one is where it *REALLY* should  be?

 

I did an 

```
emerge -C apache
```

 on an apache 2.0 install and noticed that modules.d/41_mod_ssl.default-vhost.conf was still in the modules directory.  

Then I did a 

```
rm -rf /etc/apache/

emerge apache
```

which emerged apache2.2.

There was no more modules.d/41_mod_ssl.default-vhost.conf file 

but vhosts.d/00_default_ssl_vhost.conf was newly installed.  

So from this I think that vhosts.d/00_default_ssl_vhost.conf is 

really where it should be and modules.d/41_mod_ssl.default-vhost.conf 

was a leftover from the previous version of apache that was on your system 

at one point in time.

Cheers,

----------

