mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 06:46:50 +01:00
services: nginx: Use mime.types.
* gnu/service/web.scm (default-nginx-config): Add 'nginx' parameter and honor it. Adjust callers.
This commit is contained in:
parent
73f0e1ab79
commit
54412ebfeb
1 changed files with 4 additions and 3 deletions
|
@ -180,7 +180,7 @@ (define (nginx-upstream-config upstream)
|
||||||
(nginx-upstream-configuration-servers upstream)))
|
(nginx-upstream-configuration-servers upstream)))
|
||||||
" }\n"))
|
" }\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"
|
(mixed-text-file "nginx.conf"
|
||||||
"user nginx nginx;\n"
|
"user nginx nginx;\n"
|
||||||
"pid " run-directory "/pid;\n"
|
"pid " run-directory "/pid;\n"
|
||||||
|
@ -192,6 +192,7 @@ (define (default-nginx-config log-directory run-directory server-list upstream-l
|
||||||
" uwsgi_temp_path " run-directory "/uwsgi_temp;\n"
|
" uwsgi_temp_path " run-directory "/uwsgi_temp;\n"
|
||||||
" scgi_temp_path " run-directory "/scgi_temp;\n"
|
" scgi_temp_path " run-directory "/scgi_temp;\n"
|
||||||
" access_log " log-directory "/access.log;\n"
|
" access_log " log-directory "/access.log;\n"
|
||||||
|
" include " nginx "/share/nginx/conf/mime.types;\n"
|
||||||
"\n"
|
"\n"
|
||||||
(string-join
|
(string-join
|
||||||
(filter (lambda (section) (not (null? section)))
|
(filter (lambda (section) (not (null? section)))
|
||||||
|
@ -235,7 +236,7 @@ (define nginx-activation
|
||||||
;; Check configuration file syntax.
|
;; Check configuration file syntax.
|
||||||
(system* (string-append #$nginx "/sbin/nginx")
|
(system* (string-append #$nginx "/sbin/nginx")
|
||||||
"-c" #$(or config-file
|
"-c" #$(or config-file
|
||||||
(default-nginx-config log-directory
|
(default-nginx-config nginx log-directory
|
||||||
run-directory server-blocks upstream-blocks))
|
run-directory server-blocks upstream-blocks))
|
||||||
"-t")))))
|
"-t")))))
|
||||||
|
|
||||||
|
@ -250,7 +251,7 @@ (define nginx-shepherd-service
|
||||||
(zero?
|
(zero?
|
||||||
(system* #$nginx-binary "-c"
|
(system* #$nginx-binary "-c"
|
||||||
#$(or config-file
|
#$(or config-file
|
||||||
(default-nginx-config log-directory
|
(default-nginx-config nginx log-directory
|
||||||
run-directory server-blocks upstream-blocks))
|
run-directory server-blocks upstream-blocks))
|
||||||
#$@args))))))
|
#$@args))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue