From 6993d1d17288932f8c9bacf1a9c2d66924a3bd91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dybiec?= Date: Wed, 17 Apr 2019 16:36:31 +0200 Subject: Add nginx config for docker registry --- composer/nginx/conf.d/dybiec.info.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/composer/nginx/conf.d/dybiec.info.conf b/composer/nginx/conf.d/dybiec.info.conf index 83e2cd6..90cd471 100644 --- a/composer/nginx/conf.d/dybiec.info.conf +++ b/composer/nginx/conf.d/dybiec.info.conf @@ -24,6 +24,23 @@ server { proxy_pass http://localhost:5004; } } +server { + listen 80; + listen 443 ssl; + server_name registry.dybiec.info; + + ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; + + location / { + proxy_pass http://localhost:5000; + proxy_set_header Host $http_host; # required for docker client's sake + proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + client_max_body_size 0; + } +} server { listen 80; server_name git.dybiec.info; -- cgit v1.2.3