[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] improve nginx-service
From: |
Julien Lepiller |
Subject: |
Re: [PATCH] improve nginx-service |
Date: |
Sun, 6 Nov 2016 12:11:42 +0100 |
On Fri, 4 Nov 2016 23:34:31 +0100
Hartmut Goebel <address@hidden> wrote:
> Am 04.11.2016 um 23:12 schrieb Julien Lepiller:
> >> > gnu/services/web.scm:118:34: In procedure
> >> > default-nginx-vhost-config: gnu/services/web.scm:118:34: In
> >> > procedure struct_vtable: Wrong type argument in position 1
> >> > (expecting struct): (nginx-vhost-configuration (root
> >> > taler-landing-page))
> > What is your configuration exactly, and what is taler-landing-page?
> >
>
> The configuration is like in your gtk-doc-vhost, except that I'm not
> using gtk+2 and omitting the "string-append" for the path.
>
I attached new patches that add more documentation (I hope it helps).
Using this configuration works for me:
(nginx-service)
(service (service-type
(name 'foo)
(extensions
(list (service-extension
nginx-service-type
(const (list
;; a vhost that actually serves html files
(nginx-vhost-configuration
(https-port #f)
(ssl-certificate #f)
(ssl-certificate-key #f)
(root #~(string-append #$cups
"/share/doc/cups/ja")))
;; just to show how to use a package
;; directly
(nginx-vhost-configuration
(server-name (list "help"))
(https-port #f)
(ssl-certificate #f)
(ssl-certificate-key #f)
(root cups)))))))) #t)
It would work with simple-service too.
It generates this configuration file for nginx:
user nginx nginx;
pid /var/run/nginx/pid;
error_log /var/log/nginx/error.log info;
http {
client_body_temp_path /var/run/nginx/client_body_temp;
proxy_temp_path /var/run/nginx/proxy_temp;
fastcgi_temp_path /var/run/nginx/fastcgi_temp;
uwsgi_temp_path /var/run/nginx/uwsgi_temp;
scgi_temp_path /var/run/nginx/scgi_temp;
access_log /var/log/nginx/access.log;
server {
listen 80;
server_name help ;
root /gnu/store/l6n860s5fmaxhwcx17mjrfw4wcqx8xy8-cups-2.1.0;
index index.html ;
server_tokens off;
}
server {
listen 80;
server_name _ ;
root
/gnu/store/l6n860s5fmaxhwcx17mjrfw4wcqx8xy8-cups-2.1.0/share/doc/cups/ja;
index index.html ;
server_tokens off;
}
}
events {}
0001-Make-nginx-service-extensible.patch
Description: Text Data
0002-service-Fix-multiple-nginx-index-and-server-name.patch
Description: Text Data
0003-services-Accept-gexps-as-nginx-configuration-value.patch
Description: Text Data
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/02
- Re: [PATCH] improve nginx-service, Ludovic Courtès, 2016/11/03
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/03
- Re: [PATCH] improve nginx-service, Ludovic Courtès, 2016/11/04
- Re: [PATCH] improve nginx-service, Julien Lepiller, 2016/11/04
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/04
- Re: [PATCH] improve nginx-service, Julien Lepiller, 2016/11/04
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/04
- Re: [PATCH] improve nginx-service,
Julien Lepiller <=
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/04
- Re: [PATCH] improve nginx-service, Tobias Geerinckx-Rice, 2016/11/06
- Re: [PATCH] improve nginx-service, Ludovic Courtès, 2016/11/06
- Re: [PATCH] improve nginx-service, Julien Lepiller, 2016/11/20
- Re: [PATCH] improve nginx-service, Hartmut Goebel, 2016/11/22
- Re: [PATCH] improve nginx-service, julien lepiller, 2016/11/23
- Re: [PATCH] improve nginx-service, Clément Lassieur, 2016/11/25
- is using eval good style in guile?(was: [PATCH] improve nginx-service), Hartmut Goebel, 2016/11/25
- Re: is using eval good style in guile?, Andy Wingo, 2016/11/25
- Re: is using eval good style in guile?, Clément Lassieur, 2016/11/26