create directory '/var/www/letsencrypt", set WELLKNOWN=/var/www/letsencrypt"
Originally created by @assistcontrol on GitHub (May 8, 2016).
The documentation for WELLKNOWN gives conflicting instructions.
> your WELLKNOWN variable **must** include the "acme-challenge" subdirectory
> (eg, `WELLKNOWN="/etc/wellknown/acme-challenge"`, **not** `WELLKNOWN="/etc/wellknown"`
>
> An example config would be to create a directory `/var/www/letsencrypt`,
> set `WELLKNOWN=/var/www/letsencrypt`
So does `WELLKNOWN` have to have `"acme-challenge"` at the end or not? What is the difference between:
> `WELLKNOWN="/etc/wellknown/acme-challenge"` **not** `WELLKNOWN="/etc/wellknown"`
and
> create directory `'/var/www/letsencrypt"`, set `WELLKNOWN=/var/www/letsencrypt"`
I agree that documentation may be a bit confusing, I'll have to work on that.
For now I hope this is easy to understand:
Let's say you have a page http://example.org. In that case the ACME server will look under http://example.org/.well-known/acme-challenge/[...] for challenge responses.
If you have a simple setup with basically just one webpage you could do something like WELLKNOWN=/var/www/.well-known/acme-challenge, so letsencrypt.sh will store the challenge responses directly in that directory.
If you have a more complicated setup it's easier to add an Alias or location or whatever part to your webserver config telling it to serve /.well-known/acme-challenge on your domain from a different directory.
With that in mind you'd probably do something like location /.well-known/acme-challenge { alias /var/www/letsencrypt; }, and in that case you obviously don't need to add the .well-known/[...] part to your actual path.
@lukas2511 commented on GitHub (May 8, 2016):
I agree that documentation may be a bit confusing, I'll have to work on that.
For now I hope this is easy to understand:
Let's say you have a page `http://example.org`. In that case the ACME server will look under `http://example.org/.well-known/acme-challenge/[...]` for challenge responses.
If you have a simple setup with basically just one webpage you could do something like `WELLKNOWN=/var/www/.well-known/acme-challenge`, so letsencrypt.sh will store the challenge responses directly in that directory.
If you have a more complicated setup it's easier to add an Alias or location or whatever part to your webserver config telling it to serve `/.well-known/acme-challenge` on your domain from a different directory.
With that in mind you'd probably do something like `location /.well-known/acme-challenge { alias /var/www/letsencrypt; }`, and in that case you obviously don't need to add the `.well-known/[...]` part to your actual path.
So if you set WELLKNOWN=/var/www/letsencrypt does letsencrypt.sh automatically create .well-known/acme-challenge/ in it?
Does "your WELLKNOWN variable must include the "acme-challenge" subdirectory" mean
The WELLKNOWN variable must have "acme-challenge" at the end (i.e. WELLKNOWN=/foo/bar/acme-challenge)
or
The path set by WELLKNOWN must have an "acme-challenge" directory in it (i.e. WELLKNOWN=/foo/bar; mkdir /foo/bar/acme-challenge)
Sorry for being dense, but the docs sortof imply two different things at once.
@assistcontrol commented on GitHub (May 8, 2016):
So if you set `WELLKNOWN=/var/www/letsencrypt` does letsencrypt.sh automatically create `.well-known/acme-challenge/` in it?
Does "your `WELLKNOWN` variable **must** include the "acme-challenge" subdirectory" mean
- The `WELLKNOWN` variable must have "acme-challenge" at the end (i.e. `WELLKNOWN=/foo/bar/acme-challenge`)
or
- The path set by `WELLKNOWN` must have an "acme-challenge" directory in it (i.e. `WELLKNOWN=/foo/bar; mkdir /foo/bar/acme-challenge`)
Sorry for being dense, but the docs sortof imply two different things at once.
As i already said there is some work to be done about documentation.
If you use the simple approach I explained in my last response you'll have to set WELLKNOWN=/var/www/.well-known/acme-challenge and it will create files like /var/www/.well-known/acme-challenge/TOKEN, that can then be served as http://example.org/.well-known/acme-challenge/TOKEN.
If you define an alias you'll have WELLKNOWN=/var/www/letsencrypt with /var/www/letsencrypt/TOKEN and still everything served as http://example.org/.well-known/acme-challenge/TOKEN.
@lukas2511 commented on GitHub (May 8, 2016):
As i already said there is some work to be done about documentation.
If you use the simple approach I explained in my last response you'll have to set `WELLKNOWN=/var/www/.well-known/acme-challenge` and it will create files like `/var/www/.well-known/acme-challenge/TOKEN`, that can then be served as `http://example.org/.well-known/acme-challenge/TOKEN`.
If you define an alias you'll have `WELLKNOWN=/var/www/letsencrypt` with `/var/www/letsencrypt/TOKEN` and still everything served as `http://example.org/.well-known/acme-challenge/TOKEN`.
Yeah, the wording could be clearer. the WELLKNOWN needs to point to the directory that the webserver will serve as the absolute path URI, etc.
Cheers!
@seefood commented on GitHub (May 9, 2016):
Yeah, the wording could be clearer. the WELLKNOWN needs to point to the directory that the webserver will serve as the absolute path URI, etc.
Cheers!
Slightly related: Apparently the default value for WELLKNOWN is "$BASEDIR/.acme-challenges" (note the "s" at the end), but everywhere else discusses just ".acme-challenge". I got around it by overriding the default in the config.sh file.
@mortenf commented on GitHub (May 21, 2016):
Slightly related: Apparently the default value for WELLKNOWN is "$BASEDIR/.acme-challenges" (note the "s" at the end), but everywhere else discusses just ".acme-challenge". I got around it by overriding the default in the config.sh file.
@mortenf since you shouldn't expose your basedir to the web anyway this shouldn't make much of a difference. i think i'll change the default value to something completely different to make this a bit clearer.
@lukas2511 commented on GitHub (May 22, 2016):
@mortenf since you shouldn't expose your basedir to the web anyway this shouldn't make much of a difference. i think i'll change the default value to something completely different to make this a bit clearer.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @assistcontrol on GitHub (May 8, 2016).
The documentation for WELLKNOWN gives conflicting instructions.
So does
WELLKNOWNhave to have"acme-challenge"at the end or not? What is the difference between:and
@lukas2511 commented on GitHub (May 8, 2016):
I agree that documentation may be a bit confusing, I'll have to work on that.
For now I hope this is easy to understand:
Let's say you have a page
http://example.org. In that case the ACME server will look underhttp://example.org/.well-known/acme-challenge/[...]for challenge responses.If you have a simple setup with basically just one webpage you could do something like
WELLKNOWN=/var/www/.well-known/acme-challenge, so letsencrypt.sh will store the challenge responses directly in that directory.If you have a more complicated setup it's easier to add an Alias or location or whatever part to your webserver config telling it to serve
/.well-known/acme-challengeon your domain from a different directory.With that in mind you'd probably do something like
location /.well-known/acme-challenge { alias /var/www/letsencrypt; }, and in that case you obviously don't need to add the.well-known/[...]part to your actual path.@assistcontrol commented on GitHub (May 8, 2016):
So if you set
WELLKNOWN=/var/www/letsencryptdoes letsencrypt.sh automatically create.well-known/acme-challenge/in it?Does "your
WELLKNOWNvariable must include the "acme-challenge" subdirectory" meanWELLKNOWNvariable must have "acme-challenge" at the end (i.e.WELLKNOWN=/foo/bar/acme-challenge)or
WELLKNOWNmust have an "acme-challenge" directory in it (i.e.WELLKNOWN=/foo/bar; mkdir /foo/bar/acme-challenge)Sorry for being dense, but the docs sortof imply two different things at once.
@lukas2511 commented on GitHub (May 8, 2016):
As i already said there is some work to be done about documentation.
If you use the simple approach I explained in my last response you'll have to set
WELLKNOWN=/var/www/.well-known/acme-challengeand it will create files like/var/www/.well-known/acme-challenge/TOKEN, that can then be served ashttp://example.org/.well-known/acme-challenge/TOKEN.If you define an alias you'll have
WELLKNOWN=/var/www/letsencryptwith/var/www/letsencrypt/TOKENand still everything served ashttp://example.org/.well-known/acme-challenge/TOKEN.@assistcontrol commented on GitHub (May 8, 2016):
Okay it just clicked there, thank you :-)
@seefood commented on GitHub (May 9, 2016):
Yeah, the wording could be clearer. the WELLKNOWN needs to point to the directory that the webserver will serve as the absolute path URI, etc.
Cheers!
@mortenf commented on GitHub (May 21, 2016):
Slightly related: Apparently the default value for WELLKNOWN is "$BASEDIR/.acme-challenges" (note the "s" at the end), but everywhere else discusses just ".acme-challenge". I got around it by overriding the default in the config.sh file.
@lukas2511 commented on GitHub (May 22, 2016):
@mortenf since you shouldn't expose your basedir to the web anyway this shouldn't make much of a difference. i think i'll change the default value to something completely different to make this a bit clearer.
@mortenf commented on GitHub (May 22, 2016):
Good point and thanks.