Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am receiving the following error message when restarting my apache2 server:

[Wed Oct 31 11:44:33 2012] [warn] VirtualHost 172.30.30.12:443 overlaps with VirtualHost 172.30.30.12:443, the first has precedence, perhaps you need a NameVirtualHost directive ... waiting 
[Wed Oct 31 11:44:34 2012] [warn] VirtualHost 172.30.30.12:443 overlaps with VirtualHost 172.30.30.12:443, the first has precedence, perhaps you need a NameVirtualHost directive

I recently changed my VirtualHost file so that it currently reads as follows:

<VirtualHost *:80>
ServerName www.mydomain.com
ServerAlias mydomain.com
ServerAdmin daniel@mydomain.ca
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost 172.30.30.12:443>
ServerName www.mydomain.com
ServerAlias mydomain.com
ServerAdmin daniel@mydomain.ca
SSLEngine on
SSLProtocol all
SSLCertificateFile /etc/ssl/certs/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/server_ev.key
SSLCertificateChainFile /etc/ssl/certs/intermediate.crt
DocumentRoot /home/Dropbox/mydomain.com/
<Directory /home/Dropbox/mydomain.com/>
<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
# <Location /squirrelmail>
RewriteEngine on
RewriteCond %{HTTPS} !^on$ [NC]
RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
# </Location>
</IfModule>
</IfModule>
SSLOptions +StrictRequire

Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
SSLProtocol -all +TLSv1 +SSLv3
SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM

SSLVerifyClient none
SSLProxyEngine off
</VirtualHost>

Am I doing something wrong? What could be the reason for this error? Thanks.

share|improve this question
add comment

1 Answer 1

You should check the configuration files that were set up when you installed Apache and/or OpenSSL. On CentOS, the file /etc/httpd/conf.d/ssl.conf is created and has it's own default VirtualHost.

Run apachectl -S to see where all VirtualHosts are defined and hopefully you can find where your other VirtualHost on port 443 is defined so you can get rid of the one you do not want.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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