-
-
Save ijy/6006718 to your computer and use it in GitHub Desktop.
A shell script to setup SSL on your localhost.
This file contains 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
mkdir ~/Desktop/ssl | |
cd ~/Desktop/ssl | |
openssl genrsa -des3 -out server.key 1024 | |
openssl req -new -key server.key -out server.csr | |
cp server.key server.key.org | |
openssl rsa -in server.key.org -out server.key | |
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | |
sudo cp server.crt /private/etc/apache2/server.crt | |
sudo cp server.key /private/etc/apache2/server.key | |
# Include SSL Conf in /private/etc/apache2/httpd.conf | |
sudo sed -i .bak 's/\#Include \/private\/etc\/apache2\/extra\/httpd-ssl.conf/Include \/private\/etc\/apache2\/extra\/httpd-ssl.conf/g' /private/etc/apache2/httpd.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment