in a project I´m working I got the task of being responsible for our gitlab server. In the gitlab.rb of this existing service I found the following line:

nginx['custom_gitlab_server_config'] = "location ^~ /.well-known { root /var/www/letsencrypt; }"

Can anyone explain me what´s happening there?

Thank you!


It looks like it's redirecting requests to gitlabserver.tld/.well-known to /var/www/letsencrypt. Let's Encrypt verifies you own a domain by placing the .well-known directory in the root of your webserver than attempting to read files from there.

So the config line is basically to allow letsencrypt verification for free SSL certificates.


allows you to specify custom configuration for nginx which is the web server gitlab uses. Info on nginx location can be found here: http://nginx.org/en/docs/http/ngx_http_core_module.html#location

  • Great so far! Could you explain the syntax for me? – eragon-2006 Nov 18 '17 at 19:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.