Created
          October 29, 2014 05:01 
        
      - 
      
 - 
        
Save astrsk-hori/c487ae4bcc3d11f48f7c to your computer and use it in GitHub Desktop.  
    macのapache2でsslとオレオレ証明書の設定 ref: http://qiita.com/astrsk_hori/items/d7ce9636cfcfae5d96f8
  
        
  
    
      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
    
  
  
    
  | 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" | 
  
    
      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
    
  
  
    
  | sudo /usr/sbin/apachectl restart | 
  
    
      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
    
  
  
    
  | <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> | |
  
    
      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
    
  
  
    
  | # 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