Skip to content

Commit 75f131d

Browse files
committedNov 29, 2016
acme: ensure nginx challenges directory is writeable
1 parent 69e0740 commit 75f131d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

Diff for: ‎nixos/modules/security/acme.nix

+1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ in
178178
path = [ pkgs.simp_le ];
179179
preStart = ''
180180
mkdir -p '${cfg.directory}'
181+
chown '${data.user}:${data.group}' '${cfg.directory}'
Has a comment. Original line has a comment.
181182
if [ ! -d '${cpath}' ]; then
182183
mkdir '${cpath}'
183184
fi

Diff for: ‎nixos/modules/security/acme.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ options for the <literal>security.acme</literal> module.</para>
7575

7676
<programlisting>
7777
security.acme.certs."foo.example.com" = {
78-
webroot = "/var/www/challenges";
78+
webroot = config.security.acme.directory + "/acme-challenge";
7979
email = "foo@example.com";
8080
user = "nginx";
8181
group = "nginx";

0 commit comments

Comments
 (0)
Please sign in to comment.