Created
July 13, 2015 20:00
-
-
Save mortenbra/629f0c496c0ccb4bf73f to your computer and use it in GitHub Desktop.
Install mod_ssl and set up self-signed certificate on Apache on CentOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install mod_ssl and set up self-signed certificate on Apache on CentOS | |
# install mod_ssl | |
yum install mod_ssl -y | |
# directory to store keys and certificates | |
mkdir /etc/httpd/ssl | |
# create server key and self-signed certificate | |
# you will be prompted for certificate information | |
# for "Common Name", enter your domain name, or if you don't have one yet, your site's IP address | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt | |
# open the SSL configuration file | |
nano /etc/httpd/conf.d/ssl.conf | |
# make the changes (see separate file for details) | |
# restart apache | |
service httpd restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment