Last active
April 8, 2018 02:50
-
-
Save leevigraham/6005835 to your computer and use it in GitHub Desktop.
Create Self Signed Certificate for Apache on OSX Mountain Lion: http://www.akadia.com/services/ssh_test_certificate.html
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
Hi! I've try to use your commands, but get this
Attackers might be trying to steal your information from my.site.name (for example, passwords, messages, or credit cards). NET::ERR_CERT_AUTHORITY_INVALID
May be you can advise what I need to do. Thanks.