Last active
          August 9, 2019 00:00 
        
      - 
      
 - 
        
Save clemlatz/30a280d06c0608663d86 to your computer and use it in GitHub Desktop.  
    Set up nginx + letsencrypt ssl on Mac OSX El Capitan
  
        
  
    
      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
    
  
  
    
  | # Install nginx with brew | |
| brew install nginx | |
| # Install PIP | |
| wget https://bootstrap.pypa.io/get-pip.py | |
| python get-pip.py | |
| # Get letsencrypt | |
| git clone https://github.com/letsencrypt/letsencrypt | |
| cd letsencrypt | |
| # Generate | |
| /letsencrypt certonly --webroot --webroot-path /usr/local/Cellar/nginx/1.8.1/html/ --renew-by-default --email [email protected] --text --agree-tos -d example.com --debug | |
| # Edit nginx config | |
| vim /usr/local/etc/nginx/nginx.conf | |
| # Sources | |
| # - https://community.letsencrypt.org/t/installing-and-configuring-letsencrypt-on-a-mac-os-x-client-server/8407 | |
| # - http://brianflove.com/2015/04/04/learning-nginx-on-os-x/ | |
| # - https://nodeswat.com/blog/setting-up-a-secure-node-js-web-application/ | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Let's Encrypt has a homebrew formula now, so you can do
brew install letsencryptinstead of installing pip and cloning the repo.