Created
          December 8, 2011 17:39 
        
      - 
      
 - 
        
Save croby/1447754 to your computer and use it in GitHub Desktop.  
    nginx SSL sample configuration
  
        
  
    
      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
    
  
  
    
  | worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| server { | |
| listen 443; | |
| server_name localhost; | |
| ssl on; | |
| ssl_certificate /usr/local/nginx/conf/server.crt; | |
| ssl_certificate_key /usr/local/nginx/conf/server.key; | |
| location / { | |
| proxy_pass http://localhost:8080; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| } | |
| } | |
| } | 
Then just run
sudo nginx -c /full/path/to/ssl_nginx.conf
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
Follow this to generate the .crt and the .key
source: https://wincent.com/wiki/Generating_self-signed_SSL_certificates_for_use_with_nginx