Skip to content

Instantly share code, notes, and snippets.

@astrsk-hori
Created October 29, 2014 05:01
Show Gist options
  • Save astrsk-hori/c487ae4bcc3d11f48f7c to your computer and use it in GitHub Desktop.
Save astrsk-hori/c487ae4bcc3d11f48f7c to your computer and use it in GitHub Desktop.
macのapache2でsslとオレオレ証明書の設定 ref: http://qiita.com/astrsk_hori/items/d7ce9636cfcfae5d96f8
cd /private/etc/apache2
sudo sh -c "openssl genrsa 2048 > server.key"
sudo sh -c "openssl req -new -key server.key > server.csr"
sudo sh -c "openssl x509 -days 3650 -req -signkey server.key < server.csr > server.crt"
sudo /usr/sbin/apachectl restart
<Directory "/LocalDir/public">
AllowOverride AuthConfig FileInfo Indexes Limit Options=All,MultiViews
Options -MultiViews
order deny,allow
deny from All
allow from localhost 127.0.0.1
</Directory>
# Secure (SSL/TLS) connections
Include /private/etc/apache2/extra/httpd-ssl.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment