From 02025fd6bdfa997f521c3b26a08aeba366308e84 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 18 Jan 2005 13:03:58 +0000 Subject: nginx-0.1.14-RELEASE import *) Feature: the autoconfiguration directives: --http-client-body-temp-path=PATH, --http-proxy-temp-path=PATH, and --http-fastcgi-temp-path=PATH *) Change: the directory name for the temporary files with the client request body is specified by directive client_body_temp_path, by default it is /client_body_temp. *) Feature: the ngx_http_fastcgi_module and the directives: fastcgi_pass, fastcgi_root, fastcgi_index, fastcgi_params, fastcgi_connect_timeout, fastcgi_send_timeout, fastcgi_read_timeout, fastcgi_send_lowat, fastcgi_header_buffer_size, fastcgi_buffers, fastcgi_busy_buffers_size, fastcgi_temp_path, fastcgi_max_temp_file_size, fastcgi_temp_file_write_size, fastcgi_next_upstream, and fastcgi_x_powered_by. *) Bugfix: the "[alert] zero size buf" error; the bug had appeared in 0.1.3. *) Change: the URI must be specified after the host name in the proxy_pass directive. *) Change: the %3F symbol in the URI was considered as the argument string start. *) Feature: the unix domain sockets support in the ngx_http_proxy_module. *) Feature: the ssl_engine and ssl_ciphers directives. Thanks to Sergey Skvortsov for SSL-accelerator. --- auto/cc/icc | 6 +++ auto/configure | 7 +++ auto/lib/openssl/conf | 6 +++ auto/lib/openssl/make | 1 + auto/lib/zlib/make | 6 +-- auto/modules | 5 ++ auto/options | 142 +++++++++++++++++++++++++++++++++++++++++--------- auto/os/conf | 19 +++++-- auto/sources | 14 ++++- auto/summary | 37 ++++++++++--- auto/unix | 3 ++ 11 files changed, 206 insertions(+), 40 deletions(-) (limited to 'auto') diff --git a/auto/cc/icc b/auto/cc/icc index a32eec459..b036cb645 100644 --- a/auto/cc/icc +++ b/auto/cc/icc @@ -57,6 +57,12 @@ fi CFLAGS="$CFLAGS -w1" #CFLAGS="$CFLAGS -w2" +# disable the ICC 8.0 errors: +# error #181: argument is incompatible with corresponding format +# string conversion +# error #269: invalid format string conversion +CFLAGS="$CFLAGS -wd181 -wd269" + # stop on warning CFLAGS="$CFLAGS -Werror" diff --git a/auto/configure b/auto/configure index 0cd17eae5..d046b5931 100755 --- a/auto/configure +++ b/auto/configure @@ -51,7 +51,14 @@ have=NGX_PID_PATH value="\"$NGX_PID_PATH\"" . auto/define if test -n "$NGX_ERROR_LOG_PATH"; then have=NGX_ERROR_LOG_PATH value="\"$NGX_ERROR_LOG_PATH\"" . auto/define fi + have=NGX_HTTP_LOG_PATH value="\"$NGX_HTTP_LOG_PATH\"" . auto/define +have=NGX_HTTP_CLIENT_TEMP_PATH value="\"$NGX_HTTP_CLIENT_TEMP_PATH\"" +. auto/define +have=NGX_HTTP_PROXY_TEMP_PATH value="\"$NGX_HTTP_PROXY_TEMP_PATH\"" +. auto/define +have=NGX_HTTP_FASTCGI_TEMP_PATH value="\"$NGX_HTTP_FASTCGI_TEMP_PATH\"" +. auto/define have=NGX_USER value="\"$NGX_USER\"" . auto/define have=NGX_GROUP value="\"$NGX_GROUP\"" . auto/define diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf index 0a70f3321..6792e7fd2 100644 --- a/auto/lib/openssl/conf +++ b/auto/lib/openssl/conf @@ -13,9 +13,15 @@ if [ $OPENSSL != NONE ]; then LINK_DEPS="$LINK_DEPS $OPENSSL/libssl.a $OPENSSL/libcrypto.a" CORE_LIBS="$CORE_LIBS $OPENSSL/libssl.a $OPENSSL/libcrypto.a" ;; + esac + case "$NGX_SYSTEM" in + SunOS|Linux) + CORE_LIBS="$CORE_LIBS -ldl" + ;; esac + else if [ $NGX_PLATFORM != win32 ]; then diff --git a/auto/lib/openssl/make b/auto/lib/openssl/make index 28ab00364..400761412 100644 --- a/auto/lib/openssl/make +++ b/auto/lib/openssl/make @@ -6,6 +6,7 @@ case $NGX_PLATFORM in *) echo "$OPENSSL/libssl.a:" >> $MAKEFILE echo " cd $OPENSSL \\" >> $MAKEFILE + echo " && \$(MAKE) clean \\" >> $MAKEFILE echo " && CC=\"\$(CC)\" \\" >> $MAKEFILE echo " ./config threads no-shared \\" >> $MAKEFILE echo " && \$(MAKE)" >> $MAKEFILE diff --git a/auto/lib/zlib/make b/auto/lib/zlib/make index 1884b5026..8c1abdc44 100644 --- a/auto/lib/zlib/make +++ b/auto/lib/zlib/make @@ -54,7 +54,7 @@ END $ZLIB/libz.a: $NGX_MAKEFILE cd $ZLIB \\ - && make clean \\ + && \$(MAKE) clean \\ && cp contrib/asm586/match.S . \\ && CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\ ./configure \\ @@ -71,7 +71,7 @@ END $ZLIB/libz.a: $NGX_MAKEFILE cd $ZLIB \\ - && make clean \\ + && \$(MAKE) clean \\ && cp contrib/asm686/match.S . \\ && CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\ ./configure \\ @@ -104,7 +104,7 @@ if [ $done = NO ]; then $ZLIB/libz.a: $NGX_MAKEFILE cd $ZLIB \\ - && make clean \\ + && \$(MAKE) clean \\ && CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\ ./configure \\ && \$(MAKE) libz.a diff --git a/auto/modules b/auto/modules index 6052c4d69..3221e26f1 100644 --- a/auto/modules +++ b/auto/modules @@ -140,6 +140,11 @@ if [ $HTTP_PROXY = YES ]; then 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" diff --git a/auto/options b/auto/options index 30ec352fa..3d552df77 100644 --- a/auto/options +++ b/auto/options @@ -11,7 +11,6 @@ NGX_ERROR_LOG_PATH= NGX_PID_PATH= NGX_USER= NGX_GROUP= -NGX_HTTP_LOG_PATH= CC=${CC:-gcc} CPP= @@ -40,6 +39,12 @@ EVENT_AIO=NO USE_THREADS=NO HTTP=YES + +NGX_HTTP_LOG_PATH= +NGX_HTTP_CLIENT_TEMP_PATH= +NGX_HTTP_PROXY_TEMP_PATH= +NGX_HTTP_FASTCGI_TEMP_PATH= + HTTP_CHARSET=YES HTTP_GZIP=YES HTTP_SSL=NO @@ -50,6 +55,7 @@ HTTP_AUTOINDEX=YES HTTP_STATUS=NO HTTP_REWRITE=YES HTTP_PROXY=YES +HTTP_FASTCGI=YES IMAP=NO @@ -107,6 +113,9 @@ do --without-http) HTTP=NO ;; --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;; + --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;; + --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;; + --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;; --with-http_ssl_module) HTTP_SSL=YES ;; --without-http_charset_module) HTTP_CHARSET=NO ;; @@ -118,6 +127,7 @@ do --without-http_status_module) HTTP_STATUS=NO ;; --without-http_rewrite_module) HTTP_REWRITE=NO ;; --without-http_proxy_module) HTTP_PROXY=NO ;; + --without-http_fastcgi_module) HTTP_FASTCGI=NO ;; --with-imap) IMAP=YES ;; @@ -161,30 +171,69 @@ if [ $help = yes ]; then cat << END - --help this message - - --user=USER set non-privilege user - for the worker processes - --group=GROUP set non-privilege group - for the worker processes - - --with-select_module enable select module - --without-select_module disable select module - --with-poll_module enable poll module - --without-poll_module disable poll module - - --without-http_charset_module disable ngx_http_charset_module - --without-http_rewrite_module disable ngx_http_rewrite_module - --without-http_gzip_module disable ngx_http_gzip_module - --without-http_proxy_module disable ngx_http_proxy_module - - --with-cc-opt=OPTIONS additional options for compiler - --with-ld-opt=OPTIONS additional options for linker - - --with-pcre=DIR path to PCRE library - --with-md5=DIR path to md5 library - --with-zlib=DIR path to zlib library - --with-openssl=DIR path to OpenSSL library + --help this message + + --prefix=PATH set the installation prefix + --sbin-path=PATH set path to the nginx binary file + --conf-path=PATH set path to the nginx.conf file + --error-log-path=PATH set path to the error log + --pid-path=PATH set path to nginx.pid file + + --user=USER set non-privilege user + for the worker processes + --group=GROUP set non-privilege group + for the worker processes + + --builddir=DIR set the build directory + + --with-rtsig_module enable rtsig module + --with-select_module enable select module + --without-select_module disable select module + --with-poll_module enable poll module + --without-poll_module disable poll module + + --with-http_ssl_module enable ngx_http_ssl_module + --without-http_charset_module disable ngx_http_charset_module + --without-http_gzip_module disable ngx_http_gzip_module + --without-http_userid_module disable ngx_http_userid_module + --without-http_access_module disable ngx_http_access_module + --without-http_autoindex_module disable ngx_http_autoindex_module + --without-http_rewrite_module disable ngx_http_rewrite_module + --without-http_proxy_module disable ngx_http_proxy_module + --without-http_fastcgi_module disable ngx_http_fastcgi_module + + --http-log-path=PATH set path to the http access log + --http-client-body-temp-path=PATH set path to the http client request body + temporary files path + --http-proxy-temp-path=PATH set path to the http proxy temporary + files path + --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary + files path + + --with-cc=PATH set path to C compiler + --with-cpp=PATH set path to C preprocessor + --with-cc-opt=OPTIONS set additional options for C compiler + --with-ld-opt=OPTIONS set additional options for linker + --with-cpu-opt=CPU build for specified CPU, the valid values: + pentium, pentiumpro, pentium4, sparc64 + + --without-pcre disable PCRE libarary usage + --with-pcre=DIR set path to PCRE library sources + --with-pcre-opt=OPTIONS set additional options for PCRE building + + --with-md5=DIR set path to md5 library sources + --with-md5-opt=OPTIONS set additional options for md5 building + --with-md5-asm use md5 assembler sources + + --with-zlib=DIR set path to zlib library sources + --with-zlib-opt=OPTIONS set additional options for zlib building + --with-zlib-asm=CPU use zlib assembler sources optimized + for specified CPU, the valid values: + pentium, pentiumpro + + --with-openssl=DIR set path to OpenSSL library sources + + --with-debug enable the debugging logging END @@ -201,6 +250,7 @@ if [ $HTTP = NO ]; then HTTP_STATUS=NO HTTP_REWRITE=NO HTTP_PROXY=NO + HTTP_FASTCGI=NO fi @@ -284,3 +334,45 @@ case ".$NGX_HTTP_LOG_PATH" in NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH ;; esac + + +case ".$NGX_HTTP_CLIENT_TEMP_PATH" in + ./*) + ;; + + .) + NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/client_body_temp + ;; + + *) + NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_CLIENT_TEMP_PATH + ;; +esac + + +case ".$NGX_HTTP_PROXY_TEMP_PATH" in + ./*) + ;; + + .) + NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/proxy_temp + ;; + + *) + NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_PROXY_TEMP_PATH + ;; +esac + + +case ".$NGX_HTTP_FASTCGI_TEMP_PATH" in + ./*) + ;; + + .) + NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/fastcgi_temp + ;; + + *) + NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_FASTCGI_TEMP_PATH + ;; +esac diff --git a/auto/os/conf b/auto/os/conf index dcbda8857..71a143df7 100644 --- a/auto/os/conf +++ b/auto/os/conf @@ -5,13 +5,13 @@ if test -z "$NGX_PLATFORM"; then echo "checking for OS" - SYSTEM=`uname -s 2>/dev/null` - RELEASE=`uname -r 2>/dev/null` - MACHINE=`uname -m 2>/dev/null` + NGX_SYSTEM=`uname -s 2>/dev/null` + NGX_RELEASE=`uname -r 2>/dev/null` + NGX_MACHINE=`uname -m 2>/dev/null` - echo " + $SYSTEM $RELEASE $MACHINE" + echo " + $NGX_SYSTEM $NGX_RELEASE $NGX_MACHINE" - NGX_PLATFORM="$SYSTEM:$RELEASE:$MACHINE"; + NGX_PLATFORM="$NGX_SYSTEM:$NGX_RELEASE:$NGX_MACHINE"; else echo "building for $NGX_PLATFORM" fi @@ -43,6 +43,15 @@ case $NGX_PLATFORM in esac +case $NGX_MACHINE in + + i386|i686|i86pc|amd64) + have=NGX_HAVE_NONALIGNED . auto/have + ;; + +esac + + if [ $NGX_PLATFORM != win32 ]; then NGX_USER=${NGX_USER:-nobody} diff --git a/auto/sources b/auto/sources index 2264e76b2..9c6ec193e 100644 --- a/auto/sources +++ b/auto/sources @@ -110,6 +110,7 @@ OPENSSL_SRCS=src/event/ngx_event_openssl.c UNIX_INCS="$CORE_INCS $EVENT_INCS src/os/unix" UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \ + src/core/ngx_unix_domain.h \ src/os/unix/ngx_time.h \ src/os/unix/ngx_types.h \ src/os/unix/ngx_errno.h \ @@ -125,6 +126,7 @@ UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \ src/os/unix/ngx_process_cycle.h" UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \ + src/core/ngx_unix_domain.c \ src/os/unix/ngx_time.c \ src/os/unix/ngx_errno.c \ src/os/unix/ngx_alloc.c \ @@ -203,9 +205,13 @@ NGX_WIN32_ICONS="src/os/win32/nginx.ico src/os/win32/tray.ico" NGX_WIN32_RC="src/os/win32/nginx.rc" +# the http modules that have their logging formats +# must be after ngx_http_log_module + HTTP_MODULES="ngx_http_module \ ngx_http_core_module \ - ngx_http_log_module" + ngx_http_log_module \ + ngx_http_upstream_module" HTTP_CACHE_MODULE=ngx_http_cache_module @@ -231,6 +237,7 @@ HTTP_DEPS="src/http/ngx_http.h \ src/http/ngx_http_config.h \ src/http/ngx_http_core_module.h \ src/http/ngx_http_cache.h \ + src/http/ngx_http_upstream.h \ src/http/ngx_http_busy_lock.h \ src/http/ngx_http_log_handler.h" @@ -244,6 +251,7 @@ HTTP_SRCS="src/http/ngx_http.c \ src/http/ngx_http_copy_filter.c \ src/http/ngx_http_log_handler.c \ src/http/ngx_http_request_body.c \ + src/http/ngx_http_upstream.c \ src/http/ngx_http_parse_time.c \ src/http/modules/ngx_http_static_handler.c \ src/http/modules/ngx_http_index_handler.c \ @@ -308,6 +316,10 @@ HTTP_PROXY_SRCS="src/http/modules/proxy/ngx_http_proxy_handler.c \ # src/http/modules/proxy/ngx_http_proxy_cache.c \ +HTTP_FASTCGI_MODULE=ngx_http_fastcgi_module +HTTP_FASTCGI_SRCS=src/http/modules/ngx_http_fastcgi_handler.c + + IMAP_INCS="src/imap" IMAP_DEPS="src/imap/ngx_imap.h" diff --git a/auto/summary b/auto/summary index 53455cddc..243d6a362 100644 --- a/auto/summary +++ b/auto/summary @@ -101,14 +101,39 @@ END fi -echo " nginx path prefix: $NGX_PREFIX" -echo " nginx binary file: $NGX_SBIN_PATH" -echo " nginx configuration file: $NGX_CONF_PATH" -echo " nginx pid file: $NGX_PID_PATH" +if [ $HTTP_SSL = YES ]; then + if [ $OPENSSL = NONE -o $OPENSSL = NO ]; then + +cat << END +$0: error: the HTTP SSL module requires the OpenSSL library. +You can either do not enable the module, or install the OpenSSL library +into the system, or build the OpenSSL library statically from the source +with nginx by using --with-openssl= option. + +END + + exit 1 + fi +fi + + +cat << END + nginx path prefix: $NGX_PREFIX + nginx binary file: $NGX_SBIN_PATH + nginx configuration file: $NGX_CONF_PATH + nginx pid file: $NGX_PID_PATH +END + if test -n "$NGX_ERROR_LOG_PATH"; then echo " nginx error log file: $NGX_ERROR_LOG_PATH" else echo " nginx logs errors to stderr" fi -echo " nginx http access log file: $NGX_HTTP_LOG_PATH" -echo + +cat << END + nginx http access log file: $NGX_HTTP_LOG_PATH + nginx http client request body temporary files: $NGX_HTTP_CLIENT_TEMP_PATH + nginx http proxy temporary files: $NGX_HTTP_PROXY_TEMP_PATH + nginx http fastcgi temporary files: $NGX_HTTP_FASTCGI_TEMP_PATH + +END diff --git a/auto/unix b/auto/unix index 8982968c5..37bb5d2c6 100755 --- a/auto/unix +++ b/auto/unix @@ -2,6 +2,9 @@ # Copyright (C) Igor Sysoev +have=NGX_HAVE_UNIX_DOMAIN . auto/have + + CC_WARN= ngx_fmt_collect=yes -- cgit v1.2.3