Apache: _default_ VirtualHost overlap on port 443, the first has precedence

If you have just added another VirtualHost with SSL and Apache is giving to you this error:

[warn] _default_ VirtualHost overlap on port 443, the first has precedence

Probably you miss a

NameVirtualHost *:443

at the top of your httpd-vhosts.conf file.

FreeBSD: set up self-signed SSL certificates for Apache virtualhosts


cd /usr/local/etc/apache22/
openssl genrsa -des3 -out server.key 1024

(choose a password)

openssl req -new -x509 -days 3650 -nodes -sha256 -key server.key -out server.crt

answer the questions and you’re done.
Remove the password from the cert:

cp server.key server.key2
openssl rsa -in server.key2 -out server.key

Leggi tutto “FreeBSD: set up self-signed SSL certificates for Apache virtualhosts”