简体   繁体   中英

Apache2 SSL certificate file issue

I am new to https ( HTTP using SSL). I have managed to generate a self signed certificate file and have added the following lines to the apache conf file:

SSLEngine on
SSLCertificateFile /path/to/cert/file/myfile.crt
SSLCertificateKeyFile /path/to/key/file/myfile.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

The issue I am having is that when I try to restart my server I get the following error and am confused why it is not able to read it:

Starting web server apache2
Syntax error on line 1 of /path/to/cert/file/myfile.crt:
Invalid command 'MIIDtTCCAx6gAwIBAgIJAOnu0fcwBt1BMA0GCSqGSIb3DQEBBQUAMIGZMQswCQYD', perhaps misspelled or defined by a module not included in the server configuration
   ...fail!

Any ideas?

Maybe it tries to interpret the certificate file as a script. Is the crt file executable?

man this is outdated.. well i guess you should start from the beginning with a good howto. just google apache2 ssl howto.

propably apache has no ssl module loaded. on debian you could try apache2ctl -M to list all loaded modules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM