Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have the following configuration:

DocumentRoot "/var/www/"
RewriteEngine   on
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}$1 [L,R]

DocumentRoot "/var/www/"
SSLEngine on
SSLCertificateFile /var/ssl/testing/server.crt
SSLCertificateKeyFile /var/ssl/testing/server.key
<Directory "/var/www/">
allow from all
Options +Indexes
SSLVerifyClient none

However this gives me an SSL protocol error, which I don't get if I remove the first VirtualHost.


share|improve this question

1 Answer 1

up vote 1 down vote accepted

You need to add NameVirtualHost.

Try to add the following


More information:

share|improve this answer
That gives me [warn] NameVirtualHost has no VirtualHosts –  Dean Aug 16 '12 at 11:35
Check here and make sure your configuration is proper. –  pkhamre Aug 16 '12 at 11:41
Umm, yeah, I don't see any problems with mine. New version is here: –  Dean Aug 16 '12 at 11:44
Just to make sure, you have Listen-directives for both ports? –  pkhamre Aug 16 '12 at 11:47
Yes, Listen *:443 Listen *:80 –  Dean Aug 16 '12 at 11:54

Your Answer


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.