update to 0.7.61
This commit is contained in:
parent
c96d308eef
commit
c5bd5dda76
@ -1 +1 @@
|
||||
nginx-0.6.36.tar.gz
|
||||
nginx-0.7.61.tar.gz
|
||||
|
@ -1,12 +1,13 @@
|
||||
--- conf/nginx.conf.orig 2008-05-11 21:19:44.000000000 -0600
|
||||
+++ conf/nginx.conf 2008-05-11 22:20:32.000000000 -0600
|
||||
@@ -1,28 +1,59 @@
|
||||
diff -up conf/nginx.conf.orig conf/nginx.conf
|
||||
--- conf/nginx.conf.orig 2009-04-06 07:43:46.000000000 -0600
|
||||
+++ conf/nginx.conf 2009-08-02 18:32:19.000000000 -0600
|
||||
@@ -1,28 +1,58 @@
|
||||
+#######################################################################
|
||||
+#
|
||||
+# This is the main Nginx configuration file.
|
||||
+#
|
||||
+# More information about the configuration options is available on
|
||||
+# * the English wiki - http://wiki.codemongers.com/Main
|
||||
+# * the English wiki - http://wiki.nginx.org/Main
|
||||
+# * the Russian documentation - http://sysoev.ru/nginx/
|
||||
+#
|
||||
+#######################################################################
|
||||
@ -14,7 +15,7 @@
|
||||
+#----------------------------------------------------------------------
|
||||
+# Main Module - directives that cover basic functionality
|
||||
+#
|
||||
+# http://wiki.codemongers.com/NginxMainModule
|
||||
+# http://wiki.nginx.org/NginxHttpMainModule
|
||||
+#
|
||||
+#----------------------------------------------------------------------
|
||||
|
||||
@ -25,22 +26,21 @@
|
||||
-#error_log logs/error.log;
|
||||
-#error_log logs/error.log notice;
|
||||
-#error_log logs/error.log info;
|
||||
+error_log /var/log/nginx/error.log;
|
||||
+#error_log /var/log/nginx/error.log notice;
|
||||
+#error_log /var/log/nginx/error.log info;
|
||||
+error_log /var/log/nginx/error.log;
|
||||
+#error_log /var/log/nginx/error.log notice;
|
||||
+#error_log /var/log/nginx/error.log info;
|
||||
+
|
||||
+pid /var/run/nginx.pid;
|
||||
|
||||
-#pid logs/nginx.pid;
|
||||
+pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
+
|
||||
+#----------------------------------------------------------------------
|
||||
+# Events Module
|
||||
+#
|
||||
+# http://wiki.codemongers.com/NginxEventsModule
|
||||
+# http://wiki.nginx.org/NginxHttpEventsModule
|
||||
+#
|
||||
+#----------------------------------------------------------------------
|
||||
+
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
@ -49,7 +49,7 @@
|
||||
+#----------------------------------------------------------------------
|
||||
+# HTTP Core Module
|
||||
+#
|
||||
+# http://wiki.codemongers.com/NginxHttpCoreModule
|
||||
+# http://wiki.nginx.org/NginxHttpCoreModule
|
||||
+#
|
||||
+#----------------------------------------------------------------------
|
||||
+
|
||||
@ -58,11 +58,11 @@
|
||||
+ include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
- #log_format main '$remote_addr - $remote_user [$time_local] $request '
|
||||
- # '"$status" $body_bytes_sent "$http_referer" '
|
||||
- #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
- # '$status $body_bytes_sent "$http_referer" '
|
||||
- # '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
+ log_format main '$remote_addr - $remote_user [$time_local] $request '
|
||||
+ '"$status" $body_bytes_sent "$http_referer" '
|
||||
+ log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
+ '$status $body_bytes_sent "$http_referer" '
|
||||
+ '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
- #access_log logs/access.log main;
|
||||
@ -70,7 +70,7 @@
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
@@ -31,27 +62,36 @@
|
||||
@@ -31,27 +61,36 @@ http {
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
@ -82,9 +82,8 @@
|
||||
+ # The default server
|
||||
+ #
|
||||
server {
|
||||
- listen 80;
|
||||
listen 80;
|
||||
- server_name localhost;
|
||||
+ listen 80;
|
||||
+ server_name _;
|
||||
|
||||
#charset koi8-r;
|
||||
@ -112,7 +111,7 @@
|
||||
}
|
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||
@@ -77,42 +117,4 @@
|
||||
@@ -77,42 +116,4 @@ http {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
58
nginx.init
58
nginx.init
@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# nginx - this script starts and stops the nginx daemin
|
||||
# nginx - this script starts and stops the nginx daemon
|
||||
#
|
||||
# chkconfig: - 85 15
|
||||
# chkconfig: - 85 15
|
||||
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
|
||||
# proxy and IMAP/POP3 proxy server
|
||||
# processname: nginx
|
||||
@ -41,7 +41,7 @@ start() {
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc $prog -QUIT
|
||||
killproc $prog
|
||||
retval=$?
|
||||
echo
|
||||
[ $retval -eq 0 ] && rm -f $lockfile
|
||||
@ -49,27 +49,26 @@ stop() {
|
||||
}
|
||||
|
||||
restart() {
|
||||
configtest || return $?
|
||||
configtest_q || configtest || return 6
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
configtest || return $?
|
||||
configtest_q || configtest || return 6
|
||||
echo -n $"Reloading $prog: "
|
||||
killproc $nginx -HUP
|
||||
RETVAL=$?
|
||||
echo
|
||||
}
|
||||
|
||||
force_reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
configtest() {
|
||||
$nginx -t -c $NGINX_CONF_FILE
|
||||
}
|
||||
|
||||
configtest_q() {
|
||||
configtest >/dev/null 2>&1
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
status $prog
|
||||
}
|
||||
@ -78,6 +77,29 @@ rh_status_q() {
|
||||
rh_status >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# Upgrade the binary with no downtime.
|
||||
upgrade() {
|
||||
local pidfile="/var/run/${prog}.pid"
|
||||
local oldbin_pidfile="${pidfile}.oldbin"
|
||||
|
||||
configtest_q || configtest || return 6
|
||||
echo -n $"Staring new master $prog: "
|
||||
killproc $nginx -USR2
|
||||
retval=$?
|
||||
echo
|
||||
sleep 1
|
||||
if [[ -f ${oldbin_pidfile} && -f ${pidfile} ]]; then
|
||||
echo -n $"Graceful shutdown of old $prog: "
|
||||
killproc -p ${oldbin_pidfile} -QUIT
|
||||
retval=$?
|
||||
echo
|
||||
return 0
|
||||
else
|
||||
echo $"Something bad happened, manual intervention required, maybe restart?"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
rh_status_q && exit 0
|
||||
@ -90,20 +112,22 @@ case "$1" in
|
||||
restart|configtest)
|
||||
$1
|
||||
;;
|
||||
force-reload|upgrade)
|
||||
rh_status_q || exit 7
|
||||
upgrade
|
||||
;;
|
||||
reload)
|
||||
rh_status_q || exit 7
|
||||
$1
|
||||
;;
|
||||
force-reload)
|
||||
force_reload
|
||||
;;
|
||||
status)
|
||||
rh_status
|
||||
status|status_q)
|
||||
rh_$1
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
rh_status_q || exit 0
|
||||
rh_status_q || exit 7
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
|
||||
echo $"Usage: $0 {start|stop|reload|configtest|status|force-reload|upgrade|restart}"
|
||||
exit 2
|
||||
esac
|
||||
|
37
nginx.spec
37
nginx.spec
@ -8,7 +8,7 @@
|
||||
%define nginx_webroot %{nginx_datadir}/html
|
||||
|
||||
Name: nginx
|
||||
Version: 0.6.36
|
||||
Version: 0.7.61
|
||||
Release: 1%{?dist}
|
||||
Summary: Robust, small and high performance http and reverse proxy server
|
||||
Group: System Environment/Daemons
|
||||
@ -34,9 +34,7 @@ Source1: %{name}.init
|
||||
Source2: %{name}.logrotate
|
||||
Source3: virtual.conf
|
||||
Source4: ssl.conf
|
||||
Source5: nginx-upstream-fair.tgz
|
||||
Source6: upstream-fair.conf
|
||||
Source7: %{name}.sysconfig
|
||||
Source5: %{name}.sysconfig
|
||||
Source100: index.html
|
||||
Source101: poweredby.png
|
||||
Source102: nginx-logo.png
|
||||
@ -55,15 +53,12 @@ Patch1: nginx-conf.patch
|
||||
Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3
|
||||
proxy server written by Igor Sysoev.
|
||||
|
||||
One third party module, nginx-upstream-fair, is added
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p0
|
||||
%patch1 -p0
|
||||
%{__tar} zxvf %{SOURCE5}
|
||||
|
||||
%build
|
||||
# nginx does not utilize a standard configure script. It has its own
|
||||
@ -96,13 +91,9 @@ export DESTDIR=%{buildroot}
|
||||
--with-http_perl_module \
|
||||
--with-mail \
|
||||
--with-mail_ssl_module \
|
||||
--with-cc-opt="%{optflags} $(pcre-config --cflags)" \
|
||||
--add-module=%{_builddir}/nginx-%{version}/nginx-upstream-fair
|
||||
--with-cc-opt="%{optflags} $(pcre-config --cflags)"
|
||||
make %{?_smp_mflags}
|
||||
|
||||
# rename the readme for nginx-upstream-fair so it doesn't conflict with the main
|
||||
# readme
|
||||
mv nginx-upstream-fair/README nginx-upstream-fair/README.nginx-upstream-fair
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
@ -115,9 +106,9 @@ find %{buildroot} -type f -name '*.so' -exec chmod 0755 {} \;
|
||||
chmod 0755 %{buildroot}%{_sbindir}/nginx
|
||||
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
|
||||
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
%{__install} -p -D -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||
%{__install} -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||
%{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d
|
||||
%{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE6} %{buildroot}%{nginx_confdir}/conf.d
|
||||
%{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{buildroot}%{nginx_confdir}/conf.d
|
||||
%{__install} -p -d -m 0755 %{buildroot}%{nginx_home_tmp}
|
||||
%{__install} -p -d -m 0755 %{buildroot}%{nginx_logdir}
|
||||
%{__install} -p -d -m 0755 %{buildroot}%{nginx_webroot}
|
||||
@ -136,10 +127,14 @@ done
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%pre
|
||||
%{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || :
|
||||
if [ $1 == 1 ]; then
|
||||
%{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || :
|
||||
fi
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add %{name}
|
||||
if [ $1 == 1 ]; then
|
||||
/sbin/chkconfig --add %{name}
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ $1 = 0 ]; then
|
||||
@ -148,13 +143,13 @@ if [ $1 = 0 ]; then
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/service %{name} condrestart > /dev/null 2>&1 || :
|
||||
if [ $1 == 2 ]; then
|
||||
/sbin/service %{name} upgrade || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE CHANGES README nginx-upstream-fair/README.nginx-upstream-fair
|
||||
%doc LICENSE CHANGES README
|
||||
%{nginx_datadir}/
|
||||
%{_sbindir}/%{name}
|
||||
%{_mandir}/man3/%{name}.3pm.gz
|
||||
@ -182,6 +177,10 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Aug 02 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.7.61 -
|
||||
- update to new stable 0.7.61
|
||||
- remove third party module
|
||||
|
||||
* Sat Apr 11 2009 Jeremy Hinegardner <jeremy at hinegardner dot org> 0.6.36-1
|
||||
- update to 0.6.36
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user