summaryrefslogtreecommitdiff
path: root/gnu/services/web.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2017-04-17 23:06:04 +0200
committerJulien Lepiller <julien@lepiller.eu>2017-04-18 23:15:52 +0200
commit54412ebfeb51de88eecde28ac69ace46b2d9e420 (patch)
treef876c21ab4ef7e0b483be6cc2b36953a47b5e7c4 /gnu/services/web.scm
parent73f0e1ab79c2049c7177bc62dd5e56825836a6aa (diff)
downloadpatches-54412ebfeb51de88eecde28ac69ace46b2d9e420.tar
patches-54412ebfeb51de88eecde28ac69ace46b2d9e420.tar.gz
services: nginx: Use mime.types.
* gnu/service/web.scm (default-nginx-config): Add 'nginx' parameter and honor it. Adjust callers.
Diffstat (limited to 'gnu/services/web.scm')
-rw-r--r--gnu/services/web.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 11408d7b0e..b7b2f67f13 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -180,7 +180,7 @@ of index files."
(nginx-upstream-configuration-servers upstream)))
" }\n"))
-(define (default-nginx-config log-directory run-directory server-list upstream-list)
+(define (default-nginx-config nginx log-directory run-directory server-list upstream-list)
(mixed-text-file "nginx.conf"
"user nginx nginx;\n"
"pid " run-directory "/pid;\n"
@@ -192,6 +192,7 @@ of index files."
" uwsgi_temp_path " run-directory "/uwsgi_temp;\n"
" scgi_temp_path " run-directory "/scgi_temp;\n"
" access_log " log-directory "/access.log;\n"
+ " include " nginx "/share/nginx/conf/mime.types;\n"
"\n"
(string-join
(filter (lambda (section) (not (null? section)))
@@ -235,7 +236,7 @@ of index files."
;; Check configuration file syntax.
(system* (string-append #$nginx "/sbin/nginx")
"-c" #$(or config-file
- (default-nginx-config log-directory
+ (default-nginx-config nginx log-directory
run-directory server-blocks upstream-blocks))
"-t")))))
@@ -250,7 +251,7 @@ of index files."
(zero?
(system* #$nginx-binary "-c"
#$(or config-file
- (default-nginx-config log-directory
+ (default-nginx-config nginx log-directory
run-directory server-blocks upstream-blocks))
#$@args))))))