Ssl Setup Apache Windows Server

Ssl Setup Apache Windows Server Average ratng: 8,9/10 1398 votes

This article is part of the Apache Server Guide series:

  1. Ssl Setup Apache Windows Server Download
  2. Ssl Setup Apache Windows Server Free

Certificate – actual SSL certificate for your domain; Cabundle – Signer root/intermediate certificate; Transfer the downloaded file to the Web Server. We will need them shortly. Apache SSL Configuration. And a final step would be to configure Apache so it can serve the request over HTTPS. Login to the Apache web server. In this article I am going to explain how to create a self-signed SSL certificate for Apache which will allow you to encrypt traffic to your Apache web server. Configure Apache to Support SSL. By default, Openssl is installed in Ubuntu 14.04. This module provides SSL support to Apache. As a network service: c: apache2 bin httpd -k install. Windows users wishing to use the Apache Monitor can copy that application or create a link to it in the startup folder. It is in the same folder as httpd. 1.3 Generating the Certificate. Certificates can be generated using Microsoft Certificate Server (part of the Windows Server.

  • Setting up Apache Server with SSL Support on Ubuntu

SSL is also known as Secure Socket Layer protocol. It was created by Netscape to secure transactions between web servers and browsers. SSL protocol uses a Certificate Authority (CA) to identify one end or both ends of the transactions. All communications sent over regular HTTP connections are in plain text, and any hacker can access the connection between your browser and the website and read sensitive information like credit card details or your social security number. SSL is used is to keep sensitive information sent across the Internet encrypted, so the information becomes unreadable to everyone.

Self-signed Certificate vs. Commercial Certificate

Self-signed Certificate is signed by its owner. It is generally used for testing local servers and development environment. Although self-signed certificates provide the same level of security between website and browser, most web browsers will always display a security alert message that the website certificate is self-signed and cannot be trusted, as it is not signed by the Certificate authority.

Commercial Certificate is an authorized certificate issued by a trusted certificate authority. Signed certificate is mostly used in a production environment.

In this article I am going to explain how to create a self-signed SSL certificate for Apache which will allow you to encrypt traffic to your Apache web server.

Configure Apache to Support SSL

By default, Openssl is installed in Ubuntu 14.04. This module provides SSL support to Apache. It is disabled by default, so you need to enable the SSL module first.

You can enable the SSL module by running:

After you have enabled SSL, you’ll have to restart the Apache service for the change to be recognized.

Generate a Self-signed Certificate

Server

The first step is certificate creation. For testing purposes, or for small LANs, you need to generate a private key (ca.key) with 2048 bit encryption.

To do this, run:

Then generate a certificate signing request (ca.csr) using the following command:

Lastly, generate a self-signed certificate (ca.crt) of X509 type valid for 365 keys.

Create a directory to place the certificate files we have created.

Next, copy all certificate files to the “/etc/apache2/ssl” directory.

Configure Apache to Use the SSL Certificate:

Now all the certificates are ready. The next thing to do is to set up the Apache to display the new certificate.

For this, you need to enable SSL support on the Apache default virtual host file located in the /etc/apache2/sites-enable/ directory.

You can do this by editing the Apache default virtual host config file.

Comment out all the lines by adding a “#” in front of each line and add the following lines:

Save and close the file, then restart Apache.

This should enable your new virtual host which will serve encrypted content using the SSL certificate you created.

Testing Apache (HTTPS) Server:

To verify the Apache (HTTPS) web server, open your web browser and type your server IP Address (with “https://,” for example: “https://192.168.1.227”).

An error should appear on your browser, and you must manually accept the certificate. The error message shows up because we are using a self-signed certificate instead of certificate signed by a certificate authority that the browser trusts, and the browser is unable to verify the identity of the server that you are trying to connect to. Once you add an exception to the browser’s identity verification, you should see a Ubuntu test page for your newly secure site.

Conclusion

Now, you have SSL enabled on your Apache server. This will help to secure communication between your Apache server and clients. If you want to host a public site with SSL support, then you need to purchase an SSL certificate from a trusted certificate authority.

Ebooks

Active2 years, 5 months ago

I am a developer. Our server admins have given me 3 files. .cer, .pfx and .p7b and told me to install SSL in Apache Server. I have Wamp with Apache version 2.4.9. I have search and found something. I open httpd.conf file and search for DocumentRoot. After DocumentRoot I have added,

Now when I restart the apache. I am unable to navigate the server even on http. When I comment the above lines, my sites works on http.

user960567user960567
1471 gold badge3 silver badges15 bronze badges

2 Answers

Although this is not exactly a 'question', and you do not specify what is inside your files, you're doing at least one thing wrong: a pfx file (assuming this is not a naming error) cannot be used directly as a 'key' in Apache. Without knowing the contents of the cer and the p7b file, let's assume that the pfx has all the info we need and that you have the pfx password (you do, right?), and start from there.

  1. Grab and install OpenSSL for Windows (Suggestion: https://indy.fulgan.com/SSL/ has precompiled binaries if you're not willing to build from sources in http://www.openssl.org/)

  2. Extract the different files required for Apache from the pfx (you'll be prompted for the pfx password when required):

    a. Extract the SSL Certificate Private Key (Encrypted) from the pfx

    C:Path> openssl pkcs12 -in MyPfx.pfx -nocerts -nodes -out MyEncKey.key

    b. Remove the encryption from the SSL Certificate Private Key

    C:Path> openssl rsa -in MyEncKey.key -out MyKey.key

    c. Extract SSL Certificate from the pfx

    C:Path> openssl pkcs12 -in MyPfx.pfx -clcerts -nokeys -out MyCert.cer

    d. Extract the (possibly empty) CA Certificate Chain from the pfx

    C:Path> openssl pkcs12 -in MyPfx.pfx -nodes -nokeys -cacerts -out MyCAs.crt

  3. Rebuild your httpd.conf using these lines instead of yours (note: ONLY INCLUDE THE SSLCACertificateFile line if the MyCAs.crt is not empty; you can check it with any text editor)

Ssl Setup Apache Windows Server Download

Miguel CaldasMiguel Caldas

Your SSL Certificate will work on HTTPS Port i.e 443, You need to Redirect your traffic from Http to HTTPS for Apache you need to make You need to go to MMC to put your Certificate and then Validate that one.

Ashwinikumar TiwariAshwinikumar Tiwari

Ssl Setup Apache Windows Server Free

Not the answer you're looking for? Browse other questions tagged sslapache-2.4windows-server-2012-r2 or ask your own question.

Posted on