mirror of
https://github.com/nginx/nginx.git
synced 2024-11-26 10:50:18 -06:00
09c684b2d5
*) Security: nginx now checks URI got from a backend in "X-Accel-Redirect" header line or in SSI file for the "/../" paths and zeroes. *) Change: nginx now does not treat the empty user name in the "Authorization" header line as valid one. *) Feature: the "ssl_session_timeout" directives of the ngx_http_ssl_module and ngx_imap_ssl_module. *) Feature: the "auth_http_header" directive of the ngx_imap_auth_http_module. *) Feature: the "add_header" directive. *) Feature: the ngx_http_realip_module. *) Feature: the new variables to use in the "log_format" directive: $bytes_sent, $apache_bytes_sent, $status, $time_gmt, $uri, $request_time, $request_length, $upstream_status, $upstream_response_time, $gzip_ratio, $uid_got, $uid_set, $connection, $pipe, and $msec. The parameters in the "%name" form will be canceled soon. *) Change: now the false variable values in the "if" directive are the empty string "" and string starting with "0". *) Bugfix: while using proxied or FastCGI-server nginx may leave connections and temporary files with client requests in open state. *) Bugfix: the worker processes did not flush the buffered logs on graceful exit. *) Bugfix: if the request URI was changes by the "rewrite" directive and the request was proxied in location given by regular expression, then the incorrect request was transferred to backend; the bug had appeared in 0.2.6. *) Bugfix: the "expires" directive did not remove the previous "Expires" header. *) Bugfix: nginx may stop to accept requests if the "rtsig" method and several worker processes were used. *) Bugfix: the "\"" and "\'" escape symbols were incorrectly handled in SSI commands. *) Bugfix: if the response was ended just after the SSI command and gzipping was used, then the response did not transferred complete or did not transferred at all.
296 lines
7.3 KiB
Plaintext
296 lines
7.3 KiB
Plaintext
|
|
# Copyright (C) Igor Sysoev
|
|
|
|
|
|
if [ $EVENT_SELECT = NO -a $EVENT_FOUND = NO ]; then
|
|
EVENT_SELECT=YES
|
|
fi
|
|
|
|
if [ $EVENT_SELECT = YES ]; then
|
|
have=NGX_HAVE_SELECT . auto/have
|
|
CORE_SRCS="$CORE_SRCS $SELECT_SRCS"
|
|
EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
|
|
fi
|
|
|
|
|
|
if [ $EVENT_POLL = NO -a $EVENT_FOUND = NO ]; then
|
|
EVENT_POLL=YES
|
|
fi
|
|
|
|
if [ $EVENT_POLL = YES ]; then
|
|
have=NGX_HAVE_POLL . auto/have
|
|
CORE_SRCS="$CORE_SRCS $POLL_SRCS"
|
|
EVENT_MODULES="$EVENT_MODULES $POLL_MODULE"
|
|
fi
|
|
|
|
|
|
if [ $NGX_TEST_BUILD_DEVPOLL = YES ]; then
|
|
have=NGX_HAVE_DEVPOLL . auto/have
|
|
have=NGX_TEST_BUILD_DEVPOLL . auto/have
|
|
EVENT_MODULES="$EVENT_MODULES $DEVPOLL_MODULE"
|
|
CORE_SRCS="$CORE_SRCS $DEVPOLL_SRCS"
|
|
fi
|
|
|
|
if [ $NGX_TEST_BUILD_EPOLL = YES ]; then
|
|
have=NGX_HAVE_EPOLL . auto/have
|
|
have=NGX_TEST_BUILD_EPOLL . auto/have
|
|
EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
|
|
CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
|
|
fi
|
|
|
|
if [ $NGX_TEST_BUILD_RTSIG = YES ]; then
|
|
have=NGX_HAVE_RTSIG . auto/have
|
|
have=NGX_TEST_BUILD_RTSIG . auto/have
|
|
EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
|
|
CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
|
|
fi
|
|
|
|
if [ $NGX_TEST_BUILD_SOLARIS_SENDFILEV = YES ]; then
|
|
have=NGX_TEST_BUILD_SOLARIS_SENDFILEV . auto/have
|
|
CORE_SRCS="$CORE_SRCS $SOLARIS_SENDFILEV_SRCS"
|
|
fi
|
|
|
|
|
|
if [ $HTTP != YES ]; then
|
|
have=NGX_CRYPT . auto/nohave
|
|
CRYPT_LIB=
|
|
fi
|
|
|
|
|
|
if [ $HTTP_SSI = YES ]; then
|
|
HTTP_POSTPONE=YES
|
|
fi
|
|
|
|
# the module order is important
|
|
# ngx_http_autoindex_module
|
|
# ngx_http_index_module
|
|
#
|
|
#
|
|
# the filter order is important
|
|
# ngx_http_write_filter
|
|
# ngx_http_header_filter
|
|
# ngx_http_chunked_filter
|
|
# ngx_http_range_header_filter
|
|
# ngx_http_gzip_filter
|
|
# ngx_http_postpone_filter
|
|
# ngx_http_charset_filter
|
|
# ngx_http_ssi_filter
|
|
# ngx_http_userid_filter
|
|
# ngx_http_headers_filter
|
|
# ngx_http_copy_filter
|
|
# ngx_http_range_body_filter
|
|
# ngx_http_not_modified_filter
|
|
|
|
HTTP_FILTER_MODULES="$HTTP_WRITE_FILTER_MODULE \
|
|
$HTTP_HEADER_FILTER_MODULE \
|
|
$HTTP_CHUNKED_FILTER_MODULE \
|
|
$HTTP_RANGE_HEADER_FILTER_MODULE"
|
|
|
|
if [ $HTTP_GZIP = YES ]; then
|
|
have=NGX_HTTP_GZIP . auto/have
|
|
USE_ZLIB=YES
|
|
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_GZIP_FILTER_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_GZIP_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_POSTPONE = YES ]; then
|
|
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_POSTPONE_FILTER_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTPP_POSTPONE_FILTER_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_CHARSET = YES ]; then
|
|
have=NGX_HTTP_CHARSET . auto/have
|
|
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_CHARSET_FILTER_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_CHARSET_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_SSI = YES ]; then
|
|
have=NGX_HTTP_SSI . auto/have
|
|
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SSI_FILTER_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_SSI_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_USERID = YES ]; then
|
|
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_USERID_FILTER_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_USERID_SRCS"
|
|
fi
|
|
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE"
|
|
|
|
if [ $HTTP_AUTOINDEX = YES ]; then
|
|
have=NGX_HTTP_AUTOINDEX . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_AUTOINDEX_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_AUTOINDEX_SRCS"
|
|
fi
|
|
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_INDEX_MODULE"
|
|
|
|
if [ $HTTP_AUTH_BASIC = YES ]; then
|
|
have=NGX_HTTP_AUTH_BASIC . auto/have
|
|
have=NGX_CRYPT . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_AUTH_BASIC_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_AUTH_BASIC_SRCS"
|
|
CORE_LIBS="$CORE_LIBS $CRYPT_LIB"
|
|
fi
|
|
|
|
if [ $HTTP_ACCESS = YES ]; then
|
|
have=NGX_HTTP_ACCESS . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_ACCESS_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_ACCESS_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_REALIP = YES ]; then
|
|
have=NGX_HTTP_REALIP . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_REALIP_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_REALIP_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_STATUS = YES ]; then
|
|
have=NGX_HTTP_STATUS . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_STATUS_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_STATUS_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_GEO = YES ]; then
|
|
have=NGX_HTTP_GEO . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_GEO_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_GEO_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_REWRITE = YES -a $USE_PCRE != DISABLED ]; then
|
|
have=NGX_HTTP_REWRITE . auto/have
|
|
USE_PCRE=YES
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_REWRITE_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_REWRITE_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_SSL = YES ]; then
|
|
USE_OPENSSL=YES
|
|
have=NGX_HTTP_SSL . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_SSL_MODULE"
|
|
HTTP_DEPS="$HTTP_DEPS $HTTP_SSL_DEPS"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_SSL_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_PROXY = YES ]; then
|
|
have=NGX_HTTP_PROXY . auto/have
|
|
#USE_MD5=YES
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_PROXY_MODULE"
|
|
HTTP_INCS="$HTTP_INCS $HTTP_PROXY_INCS"
|
|
HTTP_DEPS="$HTTP_DEPS $HTTP_PROXY_DEPS"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_PROXY_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP_FASTCGI = YES ]; then
|
|
HTTP_MODULES="$HTTP_MODULES $HTTP_FASTCGI_MODULE"
|
|
HTTP_SRCS="$HTTP_SRCS $HTTP_FASTCGI_SRCS"
|
|
fi
|
|
|
|
# STUB
|
|
#USE_MD5=YES
|
|
#HTTP_SRCS="$HTTP_SRCS $HTPP_CACHE_SRCS"
|
|
#HTTP_SRCS="$HTTP_SRCS $HTPP_FILE_CACHE_SRCS"
|
|
|
|
if [ $HTTP_STUB_STATUS = YES ]; then
|
|
have=NGX_STAT_STUB . auto/have
|
|
HTTP_MODULES="$HTTP_MODULES ngx_http_stub_status_module"
|
|
HTTP_SRCS="$HTTP_SRCS src/http/modules/ngx_http_stub_status_module.c"
|
|
fi
|
|
|
|
#if [ -r $NGX_OBJS/auto ]; then
|
|
# . $NGX_OBJS/auto
|
|
#fi
|
|
|
|
|
|
if test -n "$NGX_ADDONS"; then
|
|
|
|
echo configuring additional modules
|
|
|
|
for ngx_addon_dir in $NGX_ADDONS
|
|
do
|
|
echo "adding module in $ngx_addon_dir"
|
|
|
|
if test -f $ngx_addon_dir/config; then
|
|
. $ngx_addon_dir/config
|
|
|
|
echo " + $ngx_addon_name was configured"
|
|
|
|
else
|
|
echo "$0: error: no $ngx_addon_dir/config was found"
|
|
exit 1
|
|
fi
|
|
done
|
|
fi
|
|
|
|
|
|
if [ $IMAP_SSL = YES ]; then
|
|
IMAP_DEPS="$IMAP_DEPS $IMAP_SSL_DEPS"
|
|
IMAP_SRCS="$IMAP_SRCS $IMAP_SSL_SRCS"
|
|
have=NGX_IMAP_SSL . auto/have
|
|
USE_OPENSSL=YES
|
|
fi
|
|
|
|
|
|
modules="$CORE_MODULES $EVENT_MODULES"
|
|
|
|
|
|
if [ $USE_OPENSSL = YES ]; then
|
|
modules="$modules $OPENSSL_MODULE"
|
|
CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
|
|
CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
|
|
fi
|
|
|
|
if [ $HTTP = YES ]; then
|
|
modules="$modules $HTTP_MODULES $HTTP_FILTER_MODULES \
|
|
$HTTP_HEADERS_FILTER_MODULE \
|
|
$HTTP_COPY_FILTER_MODULE \
|
|
$HTTP_RANGE_BODY_FILTER_MODULE \
|
|
$HTTP_NOT_MODIFIED_FILTER_MODULE"
|
|
|
|
NGX_ADDON_DEPS="$NGX_ADDON_DEPS \$(HTTP_DEPS)"
|
|
fi
|
|
|
|
|
|
if [ $IMAP = YES ]; then
|
|
modules="$modules $IMAP_MODULES"
|
|
|
|
if [ $IMAP_SSL = YES ]; then
|
|
modules="$modules $IMAP_SSL_MODULE"
|
|
fi
|
|
|
|
modules="$modules $IMAP_AUTH_HTTP_MODULE"
|
|
IMAP_SRCS="$IMAP_SRCS $IMAP_AUTH_HTTP_SRCS"
|
|
|
|
modules="$modules $IMAP_PROXY_MODULE"
|
|
IMAP_SRCS="$IMAP_SRCS $IMAP_PROXY_SRCS"
|
|
fi
|
|
|
|
|
|
cat << END > $NGX_MODULES_C
|
|
|
|
#include <ngx_config.h>
|
|
#include <ngx_core.h>
|
|
|
|
$NGX_PRAGMA
|
|
|
|
END
|
|
|
|
for mod in $modules
|
|
do
|
|
echo "extern ngx_module_t $mod;" >> $NGX_MODULES_C
|
|
done
|
|
|
|
echo >> $NGX_MODULES_C
|
|
echo 'ngx_module_t *ngx_modules[] = {' >> $NGX_MODULES_C
|
|
|
|
for mod in $modules
|
|
do
|
|
echo " &$mod," >> $NGX_MODULES_C
|
|
done
|
|
|
|
cat << END >> $NGX_MODULES_C
|
|
NULL
|
|
};
|
|
|
|
END
|