diff options
author | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-04-17 16:36:31 +0200 |
---|---|---|
committer | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-04-17 16:36:31 +0200 |
commit | 6993d1d17288932f8c9bacf1a9c2d66924a3bd91 (patch) | |
tree | 5e36ddb66c670355595a412b4189b2a44ca0ad52 | |
parent | Comment and cleanup ansible configs (diff) |
Add nginx config for docker registry
-rw-r--r-- | composer/nginx/conf.d/dybiec.info.conf | 17 |
1 files changed, 17 insertions, 0 deletions
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 @@ -25,6 +25,23 @@ server { } } 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; return 301 https://$server_name$request_uri; |