Browse Source

nginx: enhanced .conf to enable/disable based on pkginstalled

karasz/new-early
Alejandro Mery 16 years ago
parent
commit
fb097b3a8a
  1. 21
      network/nginx/nginx.conf

21
network/nginx/nginx.conf

@ -41,12 +41,21 @@ logdir="$localstatedir/log/$pkg"
var_append confopt ' ' "--http-log-path=$logdir/access.log"
var_append confopt ' ' "--error-log-path=$logdir/error.log"
# ssl support
if pkginstalled openssl; then
var_append confopt ' ' "--with-http_ssl_module"
fi
# --with- with dependency
for x in openssl:ssl libgd:image_filter zlib:gzip_static; do
if pkginstalled "${x%:*}"; then
var_append confopt ' ' "--with-http_${x#*:}_module"
fi
done
# --without- because of dependency
for x in pcre:http_rewrite_module openssl:http-cache; do
if ! pkginstalled "${x%:*}"; then
var_append confopt ' ' "--without-${x#*:}"
fi
done
# add some optional modules not built by default
for x in stub_status flv realip gzip_static image_filter; do
# --with- without dependency
for x in stub_status flv realip; do
var_append confopt ' ' "--with-http_${x}_module"
done

Loading…
Cancel
Save