0

I am trying to install SSL certificate for apache. I have already modified httpd.conf, where I uncommented this line

Include conf/extra/httpd-ssl.conf

I have also modified this httpd-ssl.conf file. Now, when I want to run ssl by command

apachectl sslstart

I get this error

The startssl option is no longer supported.
Please edit httpd.conf to include the SSL configuration settings
and then use apachectl start.

Could someone help me? It seems that I have to forgotten for something, but I didn't find any other lines in httpd.conf relate to ssl

1
  • Have you done what the error message tells you to do? (Specifically the last line) – hardillb Dec 3 '19 at 12:21
0

As you see in the error you get the 'starssl option is no longer supported. Try to execute:

apachectl start
0

Since you didn't specified the version of Apache I will assume apache 2.4 in a Redhat/CentOS O.S.

I will assume that you know how to create a certificate or that someone has given the certificates and the keys files that you gonna need.

First you need to install and enable mod_ssl.

Install:

yum install mod_ssl

Edit /etc/httpd/conf.modules.d/00-ssl.conf and uncomment the following line:

LoadModule ssl_module modules/mod_ssl.so

Second edit /etc/httpd/conf.d/ssl.conf and ensure at least the following lines:

Listen 443 https
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
SSLSessionCache         shmcb:run/sslcache(512000)
SSLSessionCacheTimeout  300
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
Mutex sysvsem default
SSLCryptoDevice builtin

For every VirtualHost that you configure you need to include this:

<VirtualHost *:443>
    ServerName your.domain.com
    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/your.domain.com.crt
    SSLCertificateKeyFile /etc/pki/tls/private/your.domain.com.ersa
    SSLCertificateChainFile /etc/pki/tls/certs/yourCA.crt
...
# Lots of configs
...
</VirtualHost>

And test your configuration with:

apachectl configtest

Then if everything went ok restart apache.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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