summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/nginx/nginx.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/nginx/nginx.inc')
-rw-r--r--meta-webserver/recipes-httpd/nginx/nginx.inc24
1 files changed, 19 insertions, 5 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
index 2714c3d22f..bcc384bd8a 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -38,7 +38,7 @@ NGINX_USER ?= "www"
38EXTRA_OECONF = "" 38EXTRA_OECONF = ""
39DISABLE_STATIC = "" 39DISABLE_STATIC = ""
40 40
41PACKAGECONFIG ??= "ssl ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" 41PACKAGECONFIG ??= "ssl fastcgi scgi uwsgi ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
42 42
43PACKAGECONFIG[gunzip] = "--with-http_gunzip_module,," 43PACKAGECONFIG[gunzip] = "--with-http_gunzip_module,,"
44PACKAGECONFIG[http2] = "--with-http_v2_module,," 44PACKAGECONFIG[http2] = "--with-http_v2_module,,"
@@ -48,7 +48,9 @@ PACKAGECONFIG[ipv6] = "--with-ipv6,,"
48PACKAGECONFIG[webdav] = "--with-http_dav_module,," 48PACKAGECONFIG[webdav] = "--with-http_dav_module,,"
49PACKAGECONFIG[stream] = "--with-stream,," 49PACKAGECONFIG[stream] = "--with-stream,,"
50PACKAGECONFIG[http-sub-module] = "--with-http_sub_module,," 50PACKAGECONFIG[http-sub-module] = "--with-http_sub_module,,"
51 51PACKAGECONFIG[fastcgi] = ",--without-http_fastcgi_module,"
52PACKAGECONFIG[scgi] = ",--without-http_scgi_module,"
53PACKAGECONFIG[uwsgi] = ",--without-http_uwsgi_module,"
52PACKAGECONFIG[xslt] = "--with-http_xslt_module,,libxslt" 54PACKAGECONFIG[xslt] = "--with-http_xslt_module,,libxslt"
53 55
54do_configure () { 56do_configure () {
@@ -81,9 +83,9 @@ do_configure () {
81 --error-log-path=${localstatedir}/log/nginx/error.log \ 83 --error-log-path=${localstatedir}/log/nginx/error.log \
82 --http-client-body-temp-path=/run/nginx/client_body_temp \ 84 --http-client-body-temp-path=/run/nginx/client_body_temp \
83 --http-proxy-temp-path=/run/nginx/proxy_temp \ 85 --http-proxy-temp-path=/run/nginx/proxy_temp \
84 --http-fastcgi-temp-path=/run/nginx/fastcgi_temp \ 86 ${@bb.utils.contains('PACKAGECONFIG', 'fastcgi', '--http-fastcgi-temp-path=/run/nginx/fastcgi_temp', '', d)} \
85 --http-uwsgi-temp-path=/run/nginx/uwsgi_temp \ 87 ${@bb.utils.contains('PACKAGECONFIG', 'scgi', '--http-scgi-temp-path=/run/nginx/scgi_temp', '', d)} \
86 --http-scgi-temp-path=/run/nginx/scgi_temp \ 88 ${@bb.utils.contains('PACKAGECONFIG', 'uwsgi', '--http-uwsgi-temp-path=/run/nginx/uwsgi_temp', '', d)} \
87 --pid-path=/run/nginx/nginx.pid \ 89 --pid-path=/run/nginx/nginx.pid \
88 --prefix=${prefix} \ 90 --prefix=${prefix} \
89 --with-threads \ 91 --with-threads \
@@ -132,6 +134,18 @@ do_install () {
132 # cleanup configuration folder 134 # cleanup configuration folder
133 rm ${D}${sysconfdir}/nginx/*.default 135 rm ${D}${sysconfdir}/nginx/*.default
134 136
137 # remove config files based on packageconfig
138 if ! [ "${@bb.utils.filter('PACKAGECONFIG', 'fastcgi', d)}" ]; then
139 rm -f ${D}${sysconfdir}/nginx/fastcgi.conf
140 rm -f ${D}${sysconfdir}/nginx/fastcgi_params
141 fi
142 if ! [ "${@bb.utils.filter('PACKAGECONFIG', 'scgi', d)}" ]; then
143 rm -f ${D}${sysconfdir}/nginx/scgi_params
144 fi
145 if ! [ "${@bb.utils.filter('PACKAGECONFIG', 'uwsgi', d)}" ]; then
146 rm -f ${D}${sysconfdir}/nginx/uwsgi_params
147 fi
148
135 # add additional configuration folders 149 # add additional configuration folders
136 install -d ${D}${sysconfdir}/nginx/modules-available 150 install -d ${D}${sysconfdir}/nginx/modules-available
137 install -d ${D}${sysconfdir}/nginx/modules-enabled 151 install -d ${D}${sysconfdir}/nginx/modules-enabled