Skip to content

Instantly share code, notes, and snippets.

@lucas-clemente
Created November 17, 2013 21:15
Show Gist options
  • Save lucas-clemente/7518350 to your computer and use it in GitHub Desktop.
Save lucas-clemente/7518350 to your computer and use it in GitHub Desktop.
server {
listen 443;
server_name example.com;
client_max_body_size 0;
chunkin on;
ssl on;
ssl_certificate /path/to/crt;
ssl_certificate_key /path/to/key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-RC4-SHA:DHE-RSA-AES256-SHA:RC4-SHA;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://localhost:5000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
auth_basic "docker registry";
auth_basic_user_file /etc/nginx/registry_passwd;
}
location /v1/_ping {
proxy_pass http://localhost:5000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
}
location /v1/users {
proxy_pass http://localhost:5000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment