How to install SSL certificate on Apache on Windows 2012 server?
I want step by step tutorial.
How to install SSL certificate on Apache on Windows 2012 server?
I want step by step tutorial.
Re: SSL certificate on Apache
Re: SSL certificate on Apache
Sorry unfortunately i dont have it. I would google to try finding more
Re: SSL certificate on Apache
Open the command prompt and cd to your Apache installations “bin” directory. Usually it would be:
cd “C:\Program Files\Apache Software Foundation\Apache2.2\bin”
To create the SSL certificate we will need the openssl.cnf files location but the default location set by OpenSSL for this file is setup according to a Linux distribution, so we need to fix it for Windows.
We need to setup the Windows environment variable OPENSSL_CONF to point to the openssl.cnf files location. It is usually located in “C:\Program Files\Apache Software Foundation\Apache2.2\conf\openssl.cnf” directory.
So we can set it up by the following command or through the GUI interface:
set OPENSSL_CONF=C:\Program Files\Apache Software Foundation\Apache2.2\conf\openssl.cnf
All files generated from the following commands will reside in “C:\Program Files\Apache Software Foundation\Apache2.2\bin” folder.
Now that we have the environment variable set we need to create a new OpenSSL certificate request using the following command:
openssl req -new -out server.csr
It will ask you some questions and you can safely ignore them and just answer the following questions:
PEM pass phrase: Password associated with the private key you’re generating (anything of your choice).
Common Name: The fully-qualified domain name associated with this certificate (i.e. www.your-domain.com).
Now we need to remove the passphrase from the private key. The file “server.key” created from the following command should be only readable by the apache server and the administrator. You should also delete the .rnd file because it contains the entropy information for creating the key and could be used for cryptographic attacks against your private key.
openssl rsa -in privkey.pem -out server.key
Now we need to set up an expiry date, it could be any time of your choice, we use 365 days below:
openssl x509 -in server.csr -out server.cert -req -signkey server.key -days 365
We have the Self-signed SSL certificates ready now. Now We need to MOVE the “server.cert” and “server.key” file to the
“C:\Program Files\Apache Software Foundation\Apache2.2\conf” location.
Now that we have the Self-signed SSL certificate ready, all we need is to configure Apache to start the SSL server.
First we modify the “C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf” file.
Open up conf\httpd.conf in a text editor and look for the line:
LoadModule ssl_module modules/mod_ssl.so and remove any pound sign (#) characters preceding it.
Include conf/extra/httpd-ssl.conf and remove any pound sign (#) characters preceding it.
Now we need to modify the “C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-ssl.conf”. Let all the default options as it is but make sure to modify the following section according to your need:
ServerAdmin [EMAIL=“[email protected]”][email protected]
DocumentRoot “Your Root folder location”
ServerName www.domain.com:443
ServerAlias domain.com:443
ErrorLog “logs/anyFile-error.log”
CustomLog “logs/anyFile-access.log” common
SSLEngine on
SSLCertificateFile “C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.cert”
SSLCertificateKeyFile “C:/Program Files/Apache Software Foundation/Apache2.2/conf/server.key”
Make sure that “SSLCertificateFile” and “SSLCertificateKeyFile” are properly located.
For better organizing you can also put the whole section in the “C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-vhosts.conf” along with your other Virtual Host settings there but you need to uncomment “Include conf/extra/httpd-vhosts.conf” in your conf\httpd.conf file to use that.
Now we need to open an exception in Windows Firewall for TCP port 443. You can do that by going to “Windows Firewall” settings in Control Panel and adding a port in the exception section.
Restart and test
Re: SSL certificate on Apache
if you run into any issues, email me. address is in the mods forum. or anyone's guess :)
Re: SSL certificate on Apache
Are you running Apache 2 or Apache Tomcat?
Re: SSL certificate on Apache
Re: SSL certificate on Apache
Why do you want to run Apache on a Windows server, run it on a Linux server, and use Lets Encrypt to create your SSL certificate, its free, open source and run by the Linux Foundation
you can find documentation there
Re: SSL certificate on Apache
Apache 2.4.6 version… ![]()
Re: SSL certificate on Apache
if you run into any issues, email me. address is in the mods forum. or anyone's guess :)
I got PEM format... I need to put that on linux server... which is running apache 2.4.6 ... It is not self signed certificate.... It is issued by CA ....
Re: SSL certificate on Apache
Believe me. They are different. ![]()
Re: SSL certificate on Apache
https://www.digicert.com/ssl-certificate-installation-apache.htm
Here is how to convert the pem file into crt and key files.