Skip to content

Instantly share code, notes, and snippets.

@croby
Created December 8, 2011 17:39
Show Gist options
  • Save croby/1447754 to your computer and use it in GitHub Desktop.
Save croby/1447754 to your computer and use it in GitHub Desktop.
nginx SSL sample configuration
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;
}
}
}
@croby
Copy link
Author

croby commented Dec 8, 2011

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