|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../nginx/nginx.conf
|
|
|
|
# Copyright (C) 2009 The OpenSDE Project
|
|
|
|
# Copyright (C) 2006 The T2 SDE Project
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
|
|
# GNU General Public License can be found in the file COPYING.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
if [ $prefix_auto = 1 ]; then
|
|
|
|
prefix="opt/nginx"
|
|
|
|
set_confopt
|
|
|
|
fi
|
|
|
|
|
|
|
|
cleanconfopt=0
|
|
|
|
confopt="--prefix=$root/$prefix"
|
|
|
|
|
|
|
|
[[ "$sysconfdir" = */$pkg ]] || sysconfdir=$sysconfdir/$pkg
|
|
|
|
|
|
|
|
var_append confopt ' ' "--conf-path=$sysconfdir/nginx.conf"
|
|
|
|
# set path to nginx.pid file
|
|
|
|
var_append confopt ' ' "--pid-path=$localstatedir/run/nginx.pid"
|
|
|
|
# set path to nginx.lock file
|
|
|
|
var_append confopt ' ' "--lock-path=$localstatedir/lock/nginx.lock"
|
|
|
|
|
|
|
|
# set path to the http proxy temporary files
|
|
|
|
var_append confopt ' ' "--http-proxy-temp-path=$localstatedir/temp/proxy_temp"
|
|
|
|
# set path to the http fastcgi temporary
|
|
|
|
var_append confopt ' ' "--http-fastcgi-temp-path=$localstatedir/temp/fastcgi_temp"
|
|
|
|
# set path to the http client request body
|
|
|
|
var_append confopt ' ' "--http-client-body-temp-path=$localstatedir/temp/client_body_temp"
|
|
|
|
|
|
|
|
# log directories
|
|
|
|
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
|
|
|
|
|
|
|
|
# add some optional modules not built by default
|
|
|
|
for x in stub_status flv realip gzip_static image_filter; do
|
|
|
|
var_append confopt ' ' "--with-http_${x}_module"
|
|
|
|
done
|