Note
A self-signed SSL certificate is easy and free, but triggers an error in most modern browsers reporting that the connection is not private.
Let’s Encrypt offers browser trusted, free SSL certificates, but does not support Extended Validation (EV) or multi-domain (wildcard) certificates.
An Extended Validation Certificate (EV) is a certificate conforming to X.509 that proves the legal entity of the owner and is signed by a Certificate Authority key that can issue EV certificates.
To gain those features, a commercial SSL certificate must be used.
If you have a certificate file and a private key of an authority then you can jump this step
Open the command prompt:
$ cd {path-of-apache}\conf
if already not, include {path-of-apache}\bin in the %PATH%
$ set OPENSSL_CONF={path-of-apache}\conf\openssl.cnf
$ openssl req -new -out server.csr
$ openssl rsa -in privkey.pem -out server.key
$ openssl x509 -in server.csr -out server.cert -req -signkey server.key -days 365
On {path-of-apache}\conf\httpd.conf
Uncomment the lines:
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
On {path-of-apache}\conf\extra\httpd-ssl.conf
Change the properties ServerName and DocumentRoot according the environment.
Add the Directory tag, uncomment the two lines for SSL files.
DocumentRoot "{path-of-apache}/htdocs"
ServerName danilo.com:443
SSLCertificateFile "{path-of-apache}/conf/server.cert"
SSLCertificateKeyFile "{path-of-apache}/conf/server.key"
<Directory "C:/php/apache2/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
There are some errors that aren't logged, they are only showned on prompt.
Than on prompt call:
$ httpd
Enter your url in the browser:
https://stackoverflow.com/questions/33310611/how-to-configure-ssl-on-apache-2-4-windows-7
http://rubayathasan.com/tutorial/apache-ssl-on-windows/
http://smallbusiness.chron.com/configure-apache-ssl-windows-46530.html
https://gist.github.com/nguyenanhtu/33aa7ffb6c36fdc110ea8624eeb51e69