0
votes

I am enabling SSL certificate on my apache linux ecc2 instance. But when i m adding the following lines

NameVirtualHost *:443

<VirtualHost *:443>
    ServerName www.example.com
#    other configurations
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/mydomain.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/mydomain.key
</VirtualHost>

apache restart is failing.

but when i change in port in above lines to 80.apache starts working.Although i have enabled the port 443 on ec2 admin panel.

I dont know whats the issue. I have got four certificates from comodo ssl organisation.Out of them i have used only mydomain.crt.Others are intermediate certificates.Do i need to use them as well?

1
How is the apache restart failing? Is there a message in the error log?ataylor
i m sorry.can u please tell me where logs are present or where path is configured.stack guy
got the file.i m gettig an error as in console-Invalid command 'SSLCertificateFile', perhaps misspelled or defined by a module not included in the server configurationstack guy
Do you have mod_ssl installed?Mark B
i gt an output as ssl_module(shared) when i ran the first command from next answerstack guy

1 Answers

0
votes

Ensure you have the apache SSL module installed. You can check if it's installed by running:

apachectl -t -D DUMP_MODULES | grep ssl

If it's not running, try this (assuming standard Amazon Linux AMI):

sudo yum install -y mod_ssl

or if you're using apache 2.4

sudo yum install -y mod24_ssl