Skip to content

Instantly share code, notes, and snippets.

@leevigraham
Last active April 8, 2018 02:50
Show Gist options
  • Save leevigraham/6005835 to your computer and use it in GitHub Desktop.
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
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
@m4a1fox
Copy link

m4a1fox commented May 5, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment