Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: def7fbf4a3
Fetching contributors…

Cannot retrieve contributors at this time

238 lines (194 sloc) 9.062 kb
Index: nginx-catap/nginx/auto/make
===================================================================
--- nginx-catap.orig/nginx/auto/make
+++ nginx-catap/nginx/auto/make
@@ -187,8 +187,8 @@ ngx_link=${CORE_LINK:+`echo $CORE_LINK \
cat << END >> $NGX_MAKEFILE
-$NGX_OBJS${ngx_dirsep}nginx${ngx_binext}: $ngx_deps$ngx_spacer
- \$(LINK) ${ngx_long_start}${ngx_binout}$NGX_OBJS${ngx_dirsep}nginx$ngx_long_cont$ngx_objs$ngx_libs$ngx_link
+$NGX_OBJS${ngx_dirsep}nginx-catap${ngx_binext}: $ngx_deps$ngx_spacer
+ \$(LINK) ${ngx_long_start}${ngx_binout}$NGX_OBJS${ngx_dirsep}nginx-catap$ngx_long_cont$ngx_objs$ngx_libs$ngx_link
$ngx_rcc
${ngx_long_end}
END
Index: nginx-catap/nginx/src/core/nginx.c
===================================================================
--- nginx-catap.orig/nginx/src/core/nginx.c
+++ nginx-catap/nginx/src/core/nginx.c
@@ -212,7 +212,7 @@ main(int argc, char *const *argv)
}
if (ngx_show_version) {
- ngx_log_stderr(0, "nginx version: " NGINX_VER);
+ ngx_log_stderr(0, NGINX_NAME " version: " NGINX_VERSION);
if (ngx_show_help) {
ngx_log_stderr(0,
Index: nginx-catap/nginx/src/core/nginx.h
===================================================================
--- nginx-catap.orig/nginx/src/core/nginx.h
+++ nginx-catap/nginx/src/core/nginx.h
@@ -7,10 +7,13 @@
#ifndef _NGINX_H_INCLUDED_
#define _NGINX_H_INCLUDED_
+#ifndef NGINX_NAME
+#define NGINX_NAME "nginx-catap"
+#endif
#define nginx_version 1001000
#define NGINX_VERSION "1.1.0"
-#define NGINX_VER "nginx/" NGINX_VERSION
+#define NGINX_VER NGINX_NAME "/" NGINX_VERSION
#define NGINX_VAR "NGINX"
#define NGX_OLDPID_EXT ".oldbin"
Index: nginx-catap/nginx/src/http/ngx_http_header_filter_module.c
===================================================================
--- nginx-catap.orig/nginx/src/http/ngx_http_header_filter_module.c
+++ nginx-catap/nginx/src/http/ngx_http_header_filter_module.c
@@ -45,7 +45,7 @@ ngx_module_t ngx_http_header_filter_mod
};
-static char ngx_http_server_string[] = "Server: nginx" CRLF;
+static char ngx_http_server_string[] = "Server: nginx-catap" CRLF;
static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;
Index: nginx-catap/nginx/auto/install
===================================================================
--- nginx-catap.orig/nginx/auto/install
+++ nginx-catap/nginx/auto/install
@@ -20,7 +20,7 @@ case ".$NGX_SBIN_PATH" in
;;
.)
- NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx
+ NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx-catap
;;
*)
@@ -79,9 +79,9 @@ manpage:
-e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\
-e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\
-e "s|%%ERROR_LOG_PATH%%|$NGX_ERROR_LOG_PATH|" \\
- < man/nginx.8 > $NGX_OBJS/nginx.8
+ < man/nginx.8 > $NGX_OBJS/nginx-catap.8
-install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \
+install: $NGX_OBJS${ngx_dirsep}nginx-catap${ngx_binext} \
$NGX_INSTALL_PERL_MODULES
test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX'
@@ -90,7 +90,7 @@ install: $NGX_OBJS${ngx_dirsep}nginx${ng
test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \
|| mv '\$(DESTDIR)$NGX_SBIN_PATH' \
'\$(DESTDIR)$NGX_SBIN_PATH.old'
- cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH'
+ cp $NGX_OBJS/nginx-catap '\$(DESTDIR)$NGX_SBIN_PATH'
test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \
|| mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX'
@@ -124,7 +124,7 @@ install: $NGX_OBJS${ngx_dirsep}nginx${ng
test -f '\$(DESTDIR)$NGX_CONF_PATH' \
|| cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH'
- cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default'
+ cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx-catap.conf.default'
test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \
|| mkdir -p '\$(DESTDIR)`dirname "$NGX_PID_PATH"`'
Index: nginx-catap/nginx/auto/options
===================================================================
--- nginx-catap.orig/nginx/auto/options
+++ nginx-catap/nginx/auto/options
@@ -306,11 +306,11 @@ cat << END
--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
+ --sbin-path=PATH set path to the nginx-catap binary file
+ --conf-path=PATH set path to the nginx-catap.conf file
--error-log-path=PATH set path to the error log
- --pid-path=PATH set path to nginx.pid file
- --lock-path=PATH set path to nginx.lock file
+ --pid-path=PATH set path to nginx-catap.pid file
+ --lock-path=PATH set path to nginx-catap.lock file
--user=USER set non-privilege user
for the worker processes
@@ -453,10 +453,10 @@ if [ ".$NGX_PLATFORM" = ".win32" ]; then
fi
-NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
+NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx-catap.conf}
NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
-NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
-NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
+NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx-catap.pid}
+NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx-catap.lock}
if [ ".$NGX_ERROR_LOG_PATH" = ".stderr" ]; then
NGX_ERROR_LOG_PATH=
Index: nginx-catap/nginx/configure
===================================================================
--- nginx-catap.orig/nginx/configure
+++ nginx-catap/nginx/configure
@@ -59,7 +59,7 @@ fi
case ".$NGX_PREFIX" in
.)
- NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
+ NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx-catap}
have=NGX_PREFIX value="\"$NGX_PREFIX/\"" . auto/define
;;
Index: nginx-catap/nginx/src/core/ngx_log.c
===================================================================
--- nginx-catap.orig/nginx/src/core/ngx_log.c
+++ nginx-catap/nginx/src/core/ngx_log.c
@@ -150,7 +150,7 @@ ngx_log_error_core(ngx_uint_t level, ngx
msg -= (7 + err_levels[level].len + 3);
- (void) ngx_sprintf(msg, "nginx: [%V] ", &err_levels[level]);
+ (void) ngx_sprintf(msg, NGINX_NAME ": [%V] ", &err_levels[level]);
(void) ngx_write_console(ngx_stderr, msg, p - msg);
}
@@ -209,9 +209,9 @@ ngx_log_stderr(ngx_err_t err, const char
u_char errstr[NGX_MAX_ERROR_STR];
last = errstr + NGX_MAX_ERROR_STR;
- p = errstr + 7;
+ p = errstr + sizeof(NGINX_NAME ": ") - 1;
- ngx_memcpy(errstr, "nginx: ", 7);
+ ngx_memcpy(errstr, NGINX_NAME ": ", sizeof(NGINX_NAME ": ") - 1);
va_start(args, fmt);
p = ngx_vslprintf(p, last, fmt, args);
Index: nginx-catap/nginx/src/http/modules/perl/ngx_http_perl_module.c
===================================================================
--- nginx-catap.orig/nginx/src/http/modules/perl/ngx_http_perl_module.c
+++ nginx-catap/nginx/src/http/modules/perl/ngx_http_perl_module.c
@@ -161,7 +161,7 @@ ngx_http_perl_xs_init(pTHX)
{
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__);
- nginx_stash = gv_stashpv("nginx", TRUE);
+ nginx_stash = gv_stashpv(NGINX_NAME, TRUE);
}
@@ -591,7 +591,7 @@ ngx_http_perl_create_interpreter(ngx_con
}
}
- embedding[n++] = "-Mnginx";
+ embedding[n++] = "-M" NGINX_NAME;
embedding[n++] = "-e";
embedding[n++] = "0";
@@ -602,12 +602,12 @@ ngx_http_perl_create_interpreter(ngx_con
goto fail;
}
- sv = get_sv("nginx::VERSION", FALSE);
+ sv = get_sv(NGINX_NAME "::VERSION", FALSE);
ver = SvPV(sv, len);
if (ngx_strcmp(ver, NGINX_VERSION) != 0) {
ngx_log_error(NGX_LOG_ALERT, cf->log, 0,
- "version " NGINX_VERSION " of nginx.pm is required, "
+ "version " NGINX_VERSION " of " NGINX_NAME ".pm is required, "
"but %s was found", ver);
goto fail;
}
Index: nginx-catap/nginx/src/os/unix/ngx_setproctitle.c
===================================================================
--- nginx-catap.orig/nginx/src/os/unix/ngx_setproctitle.c
+++ nginx-catap/nginx/src/os/unix/ngx_setproctitle.c
@@ -88,7 +88,7 @@ ngx_setproctitle(char *title)
ngx_os_argv[1] = NULL;
- p = ngx_cpystrn((u_char *) ngx_os_argv[0], (u_char *) "nginx: ",
+ p = ngx_cpystrn((u_char *) ngx_os_argv[0], (u_char *) NGINX_NAME ": ",
ngx_os_argv_last - ngx_os_argv[0]);
p = ngx_cpystrn(p, (u_char *) title, ngx_os_argv_last - (char *) p);
Index: nginx-catap/nginx/src/core/ngx_core.h
===================================================================
--- nginx-catap.orig/nginx/src/core/ngx_core.h
+++ nginx-catap/nginx/src/core/ngx_core.h
@@ -35,6 +35,7 @@ typedef void (*ngx_connection_handler_pt
#define NGX_ABORT -6
+#include <nginx.h>
#include <ngx_errno.h>
#include <ngx_atomic.h>
#include <ngx_thread.h>
Jump to Line
Something went wrong with that request. Please try again.