Configure Apache for SSL HTTPS CentOS 6

Configure Apache for SSL HTTPS CentOS 6

Using Apache over HTTPS or SSL allows a slightly more secure setup, any computer that connects over ssl is automatically encrypted.

Original Reference:

http://xmodulo.com/2014/04/https-apache-web-server-centos.html

 

Here’s the basic instructions:

Login to your server, and su to root

h9TzVL3oTMhiAAAAABJRU5ErkJggg==

install modssl and openssl

B9Nf+oOoLJavwAAAABJRU5ErkJggg==

The next Large step is to generate a self-signed certificate

create a Private Key

wWOvQulP5usDAAAAABJRU5ErkJggg==

done

F11ObsMB0HhiAAAAAElFTkSuQmCC

now you must generate the CSR, or Certificate Signing Request

sQAAAABJRU5ErkJggg==

Fill in all the necessary fields, this will be different for almost every scenario

Finally, Generate a Self-Signed Certificate for the Life of the Server, 365 days * 7 (allowing up to 7 years)

wHvcRULrLkW6wAAAABJRU5ErkJggg==

you should see signature OK

now copy the necessary files to the appropriate directories:

ajw4AAAAAElFTkSuQmCC

Now all we have to do is set-up Apache to use the certificates:

 

Edit the Apache SSL.conf

APehNIWL9Vw6AAAAAElFTkSuQmCC

Comment Out Line 105, and add 106

Nj9v8FZfKhEVW+JAAAAAElFTkSuQmCC

now do the same for 113 and 114

eDRC4mN5opsL7p5WnAV5ki3cMVbkhvz0wpRNtENomLlJG4eaOXM03YLm75G6f8DIsLy3k9QsSIAAAAASUVORK5CYII=

### The following parameter does not need to be modified in case of a self-signed certificate. ### ### If you are using a real certificate, you may receive a certificate bundle. The bundle is added using the following parameters ### SSLCertificateChainFile /etc/pki/tls/certs/example.com.ca-bundle (reference below)

now restart apache

CwAAAABJRU5ErkJggg==

the webserver should now be able to use HTTPS.

 

That’s it!

Original Reference:

http://xmodulo.com/2014/04/https-apache-web-server-centos.html

← Bài trước Bài tiếp →