Skip to content

Commit 9d0e39b

Browse files
committedNov 29, 2016
acme: ensure nginx challenges directory is writeable
(cherry picked from commit 75f131d) Signed-off-by: Domen Kožar <domen@dev.si>
1 parent 115808b commit 9d0e39b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎nixos/modules/security/acme.nix

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ in
179179
path = [ pkgs.simp_le ];
180180
preStart = ''
181181
mkdir -p '${cfg.directory}'
182+
chown '${data.user}:${data.group}' '${cfg.directory}'
182183
if [ ! -d '${cpath}' ]; then
183184
mkdir '${cpath}'
184185
fi

‎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.