How to resolve SSLProtocol Syntax Error

H. Ferrence asked:

I am trying to install an SSL Certificate.

When I restart apache I get this error:

SSLProtocol: Illegal protocol ‘\xe2\x80\x93SSLv2’

Here are my conf file directives:

<VirtualHost *:443>
    ServerName example.com
    ServerAlias *.example.com
    DocumentRoot /home/abc/public_html/
    SSLEngine on
    SSLProtocol all -SSLv2 -SSLv3
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
    SSLCertificateFile /etc/ssl/mycert_example_com_cert.cer
    SSLCertificateKeyFile /etc/ssl/mycert.key
    SSLCACertificateFile /etc/ssl/mycert_example_com_interm.cer
    ErrorLog logs/sites_error_log
    CustomLog logs/sites_access_log common
</VirtualHost>

My answer:


Your configuration line doesn’t contain the expected hyphen (-). It instead contains an en dash (). It looks similar, but it’s a completely different character.

In fact, it appears both of them are en dashes.

This can happen if you copy and paste from a web site which has unhelpfully changed hyphens to en dashes.

To solve the problem, replace both of the en dashes with hyphens.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.