From 76529e048385fda7c425e3b1bafdec66987d87df Mon Sep 17 00:00:00 2001 From: jjh Date: Mon, 12 May 2008 05:45:46 +0000 Subject: [PATCH] - upate to new upstream stable branch 0.6 - added 3rd party module nginx-upstream-fair - added default webpages - update init script to match recommended guidelines - add /etc/nginx/conf.d support [#443280] - use /etc/sysconfig/nginx to determine nginx.conf [#442708] --- .cvsignore | 2 +- 404.html | 119 +++++++++++++++++++++++++++++++++ 50x.html | 119 +++++++++++++++++++++++++++++++++ index.html | 116 ++++++++++++++++++++++++++++++++ nginx-auto-install.patch | 57 ++++++++-------- nginx-conf.patch | 140 +++++++++++++++++++++++++++++++++------ nginx-logo.png | Bin 0 -> 370 bytes nginx-upstream-fair.tgz | Bin 0 -> 6824 bytes nginx.init | 35 ++++++++-- nginx.spec | 77 +++++++++++++++++---- nginx.sysconfig | 4 ++ poweredby.png | Bin 0 -> 3034 bytes sources | 2 +- ssl.conf | 24 +++++++ upstream-fair.conf | 18 +++++ virtual.conf | 15 +++++ 16 files changed, 662 insertions(+), 66 deletions(-) create mode 100644 404.html create mode 100644 50x.html create mode 100644 index.html create mode 100644 nginx-logo.png create mode 100644 nginx-upstream-fair.tgz create mode 100644 nginx.sysconfig create mode 100644 poweredby.png create mode 100644 ssl.conf create mode 100644 upstream-fair.conf create mode 100644 virtual.conf diff --git a/.cvsignore b/.cvsignore index 9310627..cbe70ff 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -nginx-0.5.35.tar.gz +nginx-0.6.30.tar.gz diff --git a/404.html b/404.html new file mode 100644 index 0000000..3e5b87c --- /dev/null +++ b/404.html @@ -0,0 +1,119 @@ + + + + + The page is not found + + + + + +

nginx error!

+ +
+ +

The page you are looking for is not found.

+ +
+

Website Administrator

+
+

Something has triggered missing webpage on your + website. This is the default 404 error page for + nginx that is distributed with + Fedora. It is located + /usr/share/nginx/html/404.html

+ +

You should customize this error page for your own + site or edit the error_page directive in + the nginx configuration file + /etc/nginx/nginx.conf.

+ +
+
+ +
+ [ Powered by nginx ] + + [ Powered by Fedora ] +
+
+ + diff --git a/50x.html b/50x.html new file mode 100644 index 0000000..5706d23 --- /dev/null +++ b/50x.html @@ -0,0 +1,119 @@ + + + + + The page is temporarily unavailable + + + + + +

nginx error!

+ +
+ +

The page you are looking for is temporarily unavailable. Please try again later.

+ +
+

Website Administrator

+
+

Something has triggered an error on your + website. This is the default error page for + nginx that is distributed with + Fedora. It is located + /usr/share/nginx/html/50x.html

+ +

You should customize this error page for your own + site or edit the error_page directive in + the nginx configuration file + /etc/nginx/nginx.conf.

+ +
+
+ +
+ [ Powered by nginx ] + + [ Powered by Fedora ] +
+
+ + diff --git a/index.html b/index.html new file mode 100644 index 0000000..dea2265 --- /dev/null +++ b/index.html @@ -0,0 +1,116 @@ + + + + + Test Page for the Nginx HTTP Server on Fedora + + + + + +

Welcome to nginx on Fedora!

+ +
+

This page is used to test the proper operation of the + nginx HTTP server after it has been + installed. If you can read this page, it means that the + web server installed at this site is working + properly.

+ +
+

Website Administrator

+
+

This is the default index.html page that + is distributed with nginx on + Fedora. It is located in + /usr/share/nginx/html.

+ +

You should now put your content in a location of + your choice and edit the root configuration + directive in the nginx + configuration file + /etc/nginx/nginx.conf.

+ +
+
+ +
+ [ Powered by nginx ] + + [ Powered by Fedora ] +
+
+ + diff --git a/nginx-auto-install.patch b/nginx-auto-install.patch index 86c855f..f85e7eb 100644 --- a/nginx-auto-install.patch +++ b/nginx-auto-install.patch @@ -1,6 +1,6 @@ ---- auto/install.orig 2007-03-22 09:30:15.000000000 -0600 -+++ auto/install 2007-03-22 09:40:42.000000000 -0600 -@@ -19,42 +19,42 @@ +--- auto/install.orig 2008-05-11 15:02:01.000000000 -0600 ++++ auto/install 2008-05-11 15:03:54.000000000 -0600 +@@ -19,45 +19,45 @@ install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \ $NGX_INSTALL_PERL_MODULES @@ -16,29 +16,34 @@ + test ! -f '$NGX_DEST_DIR$NGX_SBIN_PATH' || mv '$NGX_DEST_DIR$NGX_SBIN_PATH' '$NGX_DEST_DIR$NGX_SBIN_PATH.old' + cp $NGX_OBJS/nginx '$NGX_DEST_DIR$NGX_SBIN_PATH' -- test -d '`dirname "$NGX_CONF_PATH"`' \ -- || mkdir -p '`dirname "$NGX_CONF_PATH"`' -+ test -d '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`' \ -+ || mkdir -p '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`' +- test -d '$NGX_CONF_PREFIX' || mkdir -p '$NGX_CONF_PREFIX' ++ test -d '$NGX_DEST_DIR$NGX_CONF_PREFIX' || mkdir -p '$NGX_DEST_DIR$NGX_CONF_PREFIX' -- cp conf/koi-win '`dirname "$NGX_CONF_PATH"`' -- cp conf/koi-utf '`dirname "$NGX_CONF_PATH"`' -- cp conf/win-utf '`dirname "$NGX_CONF_PATH"`' -+ cp conf/koi-win '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`' -+ cp conf/koi-utf '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`' -+ cp conf/win-utf '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`' +- cp conf/koi-win '$NGX_CONF_PREFIX' +- cp conf/koi-utf '$NGX_CONF_PREFIX' +- cp conf/win-utf '$NGX_CONF_PREFIX' ++ cp conf/koi-win '$NGX_DEST_DIR$NGX_CONF_PREFIX' ++ cp conf/koi-utf '$NGX_DEST_DIR$NGX_CONF_PREFIX' ++ cp conf/win-utf '$NGX_DEST_DIR$NGX_CONF_PREFIX' -- test -f '`dirname "$NGX_CONF_PATH"`/mime.types' || \ -- cp conf/mime.types '`dirname "$NGX_CONF_PATH"`/mime.types' -- cp conf/mime.types '`dirname "$NGX_CONF_PATH"`/mime.types.default' -+ test -f '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`/mime.types' || \ -+ cp conf/mime.types '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`/mime.types' -+ cp conf/mime.types '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`/mime.types.default' +- test -f '$NGX_CONF_PREFIX/mime.types' \ +- || cp conf/mime.types '$NGX_CONF_PREFIX' +- cp conf/mime.types '$NGX_CONF_PREFIX/mime.types.default' ++ test -f '$NGX_DEST_DIR$NGX_CONF_PREFIX/mime.types' \ ++ || cp conf/mime.types '$NGX_DEST_DIR$NGX_CONF_PREFIX' ++ cp conf/mime.types '$NGX_DEST_DIR$NGX_CONF_PREFIX/mime.types.default' -- test -f '$NGX_CONF_PATH' || cp conf/nginx.conf '$NGX_CONF_PATH' -- cp conf/nginx.conf '`dirname "$NGX_CONF_PATH"`/nginx.conf.default' -+ test -f '$NGX_DEST_DIR$NGX_CONF_PATH' || cp conf/nginx.conf '$NGX_DEST_DIR$NGX_CONF_PATH' -+ cp conf/nginx.conf '`dirname "$NGX_DEST_DIR$NGX_CONF_PATH"`/nginx.conf.default' +- test -f '$NGX_CONF_PREFIX/fastcgi_params' \ +- || cp conf/fastcgi_params '$NGX_CONF_PREFIX' +- cp conf/fastcgi_params '$NGX_CONF_PREFIX/fastcgi_params.default' ++ test -f '$NGX_DEST_DIR$NGX_CONF_PREFIX/fastcgi_params' \ ++ || cp conf/fastcgi_params '$NGX_DEST_DIR$NGX_CONF_PREFIX' ++ cp conf/fastcgi_params '$NGX_DEST_DIR$NGX_CONF_PREFIX/fastcgi_params.default' + +- test -f '$NGX_CONF_PATH' || cp conf/nginx.conf '$NGX_CONF_PREFIX' +- cp conf/nginx.conf '$NGX_CONF_PREFIX/nginx.conf.default' ++ test -f '$NGX_DEST_DIR$NGX_CONF_PATH' || cp conf/nginx.conf '$NGX_DEST_DIR$NGX_CONF_PREFIX' ++ cp conf/nginx.conf '$NGX_DEST_DIR$NGX_CONF_PREFIX/nginx.conf.default' - test -d '`dirname "$NGX_PID_PATH"`' \ - || mkdir -p '`dirname "$NGX_PID_PATH"`' @@ -56,13 +61,13 @@ -if test -n "$NGX_ERROR_LOG_PATH"; then -+if test -n "$NGX_DEST_DIR/$NGX_ERROR_LOG_PATH"; then ++if test -n "$NGX_DEST_DIR$NGX_ERROR_LOG_PATH"; then cat << END >> $NGX_MAKEFILE - test -d '`dirname "$NGX_ERROR_LOG_PATH"`' || \ - mkdir -p '`dirname "$NGX_ERROR_LOG_PATH"`' -+ test -d '`dirname "$NGX_DEST_DIR/$NGX_ERROR_LOG_PATH"`' || \ -+ mkdir -p '`dirname "$NGX_DEST_DIR/$NGX_ERROR_LOG_PATH"`' ++ test -d '`dirname "$NGX_DEST_DIR$NGX_ERROR_LOG_PATH"`' || \ ++ mkdir -p '`dirname "$NGX_DEST_DIR$NGX_ERROR_LOG_PATH"`' END fi diff --git a/nginx-conf.patch b/nginx-conf.patch index 693020b..1ee292c 100644 --- a/nginx-conf.patch +++ b/nginx-conf.patch @@ -1,28 +1,60 @@ ---- conf/nginx.conf.orig 2007-03-22 22:44:23.000000000 -0600 -+++ conf/nginx.conf 2007-03-22 23:06:48.000000000 -0600 -@@ -1,12 +1,11 @@ -- +--- 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 @@ ++####################################################################### ++# ++# 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 Russian documentation - http://sysoev.ru/nginx/ ++# ++####################################################################### ++ ++#---------------------------------------------------------------------- ++# Main Module - directives that cover basic functionality ++# ++# http://wiki.codemongers.com/NginxMainModule ++# ++#---------------------------------------------------------------------- + -#user nobody; -+user nginx; ++user nginx; worker_processes 1; -#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 logs/nginx.pid; -+pid /var/run/nginx.pid; ++pid /var/run/nginx.pid; ++ ++#---------------------------------------------------------------------- ++# Events Module ++# ++# http://wiki.codemongers.com/NginxEventsModule ++# ++#---------------------------------------------------------------------- ++ events { -@@ -15,14 +14,14 @@ + worker_connections 1024; + } ++#---------------------------------------------------------------------- ++# HTTP Core Module ++# ++# http://wiki.codemongers.com/NginxHttpCoreModule ++# ++#---------------------------------------------------------------------- ++ http { -- include conf/mime.types; +- include mime.types; + include /etc/nginx/mime.types; default_type application/octet-stream; @@ -38,18 +70,88 @@ sendfile on; #tcp_nopush on; -@@ -38,7 +37,7 @@ +@@ -31,27 +62,36 @@ + keepalive_timeout 65; + + #gzip on; ++ ++ # Load config files from the /etc/nginx/conf.d directory ++ include /etc/nginx/conf.d/*.conf; + ++ # ++ # The default server ++ # + server { +- listen 80; +- server_name localhost; ++ listen 80 default; ++ server_name _; #charset koi8-r; -- #access_log logs/host.access.log main; -+ #access_log /var/log/nginx/host.access.log main; + #access_log logs/host.access.log main; location / { - root html; -@@ -113,5 +112,4 @@ - # index index.html index.htm; - # } - #} +- root html; ++ root /usr/share/nginx/html; + index index.html index.htm; + } + +- #error_page 404 /404.html; ++ error_page 404 /404.html; ++ location = /404.html { ++ root /usr/share/nginx/html; ++ } + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { +- root html; ++ root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 +@@ -77,42 +117,4 @@ + # deny all; + #} + } +- +- +- # another virtual host using mix of IP-, name-, and port-based configuration +- # +- #server { +- # listen 8000; +- # listen somename:8080; +- # server_name somename alias another.alias; +- +- # location / { +- # root html; +- # index index.html index.htm; +- # } +- #} +- +- +- # HTTPS server +- # +- #server { +- # listen 443; +- # server_name localhost; +- +- # ssl on; +- # ssl_certificate cert.pem; +- # ssl_certificate_key cert.key; +- +- # ssl_session_timeout 5m; +- +- # ssl_protocols SSLv2 SSLv3 TLSv1; +- # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; +- # ssl_prefer_server_ciphers on; +- +- # location / { +- # root html; +- # index index.html index.htm; +- # } +- #} - } diff --git a/nginx-logo.png b/nginx-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7406ba565b1d7f4d064267454ca727416d8454a8 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0vp^l|Zb($P6TTwz`@EDYgKg5Lbqo4FCWCuRMQi4^V`u zB*-uLKf}}Q23|lOW0JSK3*&z#-FrX|XMsm#F_88EW4Dvpb|AsB0>^Y94K|u#P4&@5 zK+Ypi7sn8d^J_0Ub{#h0VGUpv-=q11No|+M%JoLlzD6{{E@_@9`=%{*t*c2S2te^m~cBpla>Vu*a+(6LBduVu-mzhx`J*99~0 zJo;_QloPL{rbx_WD3T6XU%bGxpfu*9cl(;hfjysZdP?6vu5@7{Gh?-Zi`}BdPW^pB z>b;@i)Eg{r#QoN00U%@4)lkWD&(7x96RS?S|dE9s}3I{{C+D`iI~7^}oNj^UdyEBT{z# zm#_b_`9B{VoxB>{-55guKdzepot^!H{@>kuy#LMb!o>gb`9H(?XK&^Fv+rU4*_$x< zc*9->w!@y=p6!o$*ywZ`jT0V?Lw6Cof&Y{qT+TQX08nn&g8GeQ7smY={)ku%&4A0k zV}}k4gT!|_VK8!i=HU=&d+2`UI^1boyYWoIjRNRx$IOk{wd;8-4(;&=HcBEK2Yzwi zVG$3nco?xJ-#G@@sK}l z%;I?QwA&qpw(Ca=Z_AFmb{M;3k4N1dP?p_Zue<#}U7OZphah(p(9R?XJ7U=a_|9Aq z*=RIQePFWZ+1dR35+o0RX+GyfZpb@e>ldz<&RQ7EfyGIPdc&C0 zM3pt>_6JV?0dd3~;M3d4o^rvUW024(7bppe1QKilWIl+P0>(yO0Mcggh_eSc#Dk1j zpd#%cr-l92U~pl>KK+uC*4x?N+J=9SCLCBY0l3IYkmC=;N09G-00$YYbHMzEWJK#G zN=9>_W08Oahy2%sM{&dg5}omkmgpa?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lKRzF5~#tiQFH|Xj;_OiE#>FFY0y(Jw@W!gaT>W{r zpmdKfV@%?gvu5=~mGCV)y_H*6S>8~T%C1%=7JHa>l7#AhG#$Zhtpq1F$}F8}_o}#7 zpC>vPS({m=s47nj$so(WQXsohD zuG<(zp!r@^@oFfPHB&pD_*B)E<}y_U$t}%QnP9~yMP0EySlo`UXuPVLRhuHsifU(r zmsruw;-p#y6}xQJtd}vq!_OVAouOHo7mhUZ*V1PmlRFS?svgE61uY-&ulCNSr(qZd z!+)hh0x?vHojV~e+;`!QP+`09rR~JOr*Xa<$6mV*0YdL{+S(;eV#mpx#MSnyQ(C_( zpGNjwc>rO;uIq&`Px^E0&daoeex%lee4|xoua9ITS0e5I2vw628&VysF4B5$hUNzf z86J7s*B@sY{>F-9YjpN*EY@$FZF$?`+zH7~SU8J{!SF)sq)X<1jYnC+XU#DijE`I~ zP>fD3t*x;{P^`tQjKrIK`1_FO)Jh)RS+(iYLU-zUut1&7O*OI!EYamWtfKOuo%5f= zGRfgQg;EBqHz9WE!IRme@kNbAv@zSqUDGL%J=Nd!*-W}O?TF@!>o~m{-erF5-S6xhw${JDJUtX`_Otz9rKw;n@z&I`V#$N2wT9Yi zLV2n>4l=Ct(NsRJZi_$B=Y`nyejkfjTy|S7D&sJx-#FQcVif!PPL~o%%B^`!F&s*( zwDN)`$3jG}kDuY~XR(&N2X1@-7q8H=>QO`8u/dev/null 2>&1 +} + case "$1" in - start|stop|restart|reload) + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 $1 ;; force-reload) force_reload ;; status) - fdr_status + rh_status ;; condrestart|try-restart) - [ ! -f $lockfile ] || restart - ;; + rh_status_q || exit 0 + ;; *) - echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}" + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" exit 2 esac diff --git a/nginx.spec b/nginx.spec index dc35711..67523bd 100644 --- a/nginx.spec +++ b/nginx.spec @@ -5,9 +5,10 @@ %define nginx_logdir %{_localstatedir}/log/nginx %define nginx_confdir %{_sysconfdir}/nginx %define nginx_datadir %{_datadir}/nginx +%define nginx_webroot %{nginx_datadir}/html Name: nginx -Version: 0.5.35 +Version: 0.6.30 Release: 1%{?dist} Summary: Robust, small and high performance http and reverse proxy server Group: System Environment/Daemons @@ -18,16 +19,29 @@ License: BSD URL: http://nginx.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: pcre-devel,zlib-devel,openssl-devel,perl-devel +BuildRequires: pcre-devel,zlib-devel,openssl-devel,perl-devel,perl(ExtUtils::Embed) Requires: pcre,zlib,openssl -Requires(pre): %{_sbindir}/useradd -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig, /sbin/service -Requires(postun): /sbin/service +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +# for /usr/sbin/useradd +Requires(pre): shadow-utils +Requires(post): chkconfig +# for /sbin/service +Requires(preun): chkconfig, initscripts +Requires(postun): initscripts Source0: http://sysoev.ru/nginx/nginx-%{version}.tar.gz Source1: %{name}.init Source2: %{name}.logrotate +Source3: virtual.conf +Source4: ssl.conf +Source5: nginx-upstream-fair.tgz +Source6: upstream-fair.conf +Source7: %{name}.sysconfig +Source100: index.html +Source101: poweredby.png +Source102: nginx-logo.png +Source103: 50x.html +Source104: 404.html # removes -Werror in upstream build scripts. -Werror conflicts with # -D_FORTIFY_SOURCE=2 causing warnings to turn into errors. @@ -35,8 +49,8 @@ Patch0: nginx-auto-cc-gcc.patch # nginx has its own configure/build scripts. These patches allow nginx # to install into a buildroot. -Patch1: nginx-auto-install.patch -Patch2: nginx-auto-options.patch +Patch1: nginx-auto-options.patch +Patch2: nginx-auto-install.patch # configuration patch to match all the Fedora paths for logs, pid files # etc. @@ -44,7 +58,10 @@ Patch3: nginx-conf.patch %description Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 -proxy server written by Igor Sysoev. +proxy server written by Igor Sysoev. + +One third party module, nginx-upstream-fair, is added + %prep %setup -q @@ -53,6 +70,7 @@ proxy server written by Igor Sysoev. %patch1 -p0 %patch2 -p0 %patch3 -p0 +%{__tar} zxvf %{SOURCE5} %build # nginx does not utilize a standard configure script. It has its own @@ -80,13 +98,18 @@ export DESTDIR=%{buildroot} --with-http_sub_module \ --with-http_dav_module \ --with-http_flv_module \ + --with-http_gzip_static_module \ --with-http_stub_status_module \ --with-http_perl_module \ --with-mail \ --with-mail_ssl_module \ - --with-cc-opt="%{optflags} $(pcre-config --cflags)" + --with-cc-opt="%{optflags} $(pcre-config --cflags)" \ + --add-module=%{_builddir}/nginx-%{version}/nginx-upstream-fair 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} @@ -99,8 +122,14 @@ 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 0755 %{buildroot}%{nginx_confdir}/conf.d +%{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE6} %{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} +%{__install} -p -m 0644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{buildroot}%{nginx_webroot} + # convert to UTF-8 all files that give warnings. for textfile in CHANGES @@ -132,22 +161,26 @@ fi %files %defattr(-,root,root,-) -%doc LICENSE CHANGES README +%doc LICENSE CHANGES README nginx-upstream-fair/README.nginx-upstream-fair %dir %{nginx_datadir} -%dir %{nginx_datadir}/html %{_datadir}/%{name}/*/* %{_sbindir}/%{name} %{_mandir}/man3/%{name}.3pm.gz %{_initrddir}/%{name} %dir %{nginx_confdir} +%dir %{nginx_confdir}/conf.d +%config(noreplace) %{nginx_confdir}/conf.d/*.conf %config(noreplace) %{nginx_confdir}/win-utf %config(noreplace) %{nginx_confdir}/%{name}.conf.default %config(noreplace) %{nginx_confdir}/mime.types.default +%config(noreplace) %{nginx_confdir}/fastcgi_params +%config(noreplace) %{nginx_confdir}/fastcgi_params.default %config(noreplace) %{nginx_confdir}/koi-win %config(noreplace) %{nginx_confdir}/koi-utf %config(noreplace) %{nginx_confdir}/%{name}.conf %config(noreplace) %{nginx_confdir}/mime.types %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} %dir %{perl_vendorarch}/auto/%{name} %{perl_vendorarch}/%{name}.pm %{perl_vendorarch}/auto/%{name}/%{name}.so @@ -157,12 +190,32 @@ fi %changelog +* Sun May 11 2008 Jeremy Hinegardner - 0.6.30-1 +- upate to new upstream stable branch 0.6 +- added 3rd party module nginx-upstream-fair +- added default webpages + +* Sun Apr 20 2008 Jeremy Hinegardner - 0.5.35-2 +- update init script to match recommended guidelines +- add /etc/nginx/conf.d support [#443280] +- use /etc/sysconfig/nginx to determine nginx.conf [#442708] + +* Tue Mar 18 2008 Tom "spot" Callaway - 0.5.35-3 +- add Requires for versioned perl (libperl.so) +- drop silly file Requires + +* Tue Feb 19 2008 Fedora Release Engineering - 0.5.35-2 +- Autorebuild for GCC 4.3 + * Sat Jan 19 2008 Jeremy Hinegardner - 0.5.35-1 - update to 0.5.35 * Sat Dec 15 2007 Jeremy Hinegardner - 0.5.34-1 - update to 0.5.34 +* Wed Dec 05 2007 Release Engineering - 0.5.33-2 + - Rebuild for deps + * Sun Nov 11 2007 Jeremy Hinegardner - 0.5.33-1 - update to 0.5.33 diff --git a/nginx.sysconfig b/nginx.sysconfig new file mode 100644 index 0000000..8ba359b --- /dev/null +++ b/nginx.sysconfig @@ -0,0 +1,4 @@ +# Configuration file for the nginx service + +# set this to the location of the nginx configuration file +NGINX_CONF_FILE=/etc/nginx/nginx.conf diff --git a/poweredby.png b/poweredby.png new file mode 100644 index 0000000000000000000000000000000000000000..0aa96cf468de19116788c99d03886f94d100b543 GIT binary patch literal 3034 zcmV<03nlc4P)EQ$LfS=C2pV~$P$O7s0f9i} zQ3Zfi6rS@ym+MHO!w?PGxwZxZ%BXjM?JY~GH0JX zb7p_D_qX>PX7Q%Zy~Y?n?5q0B4lkep|9;>=00`cDJf1mg7Il^{TjmmK3ET$uT>}H> zX;IOT)D=d;{JHKYt2c)%)a^a?kjCnGb}6`~ZP6pN z0|vz+V_A_)vf_o2VDs_wSKs*XkndL0@m7(B$7}rbA;9bDepvtlgYfwNRPd}3^fj)n zuy13akR*B@d&i{^2zp?+xt<0t?{<^f#%l!z1zdd30%)I^oqwq8qPP$HiP0lgbiO>e zVdk^1zWloIi2s{90zCZoH)W0e#~ZEhZzg0e%3h;?17CP^^Mk|@tt@WGu9+@(cKx?- zIaN4!=*T{I>R@9@A<5yE8w_u71{}ig;!w^l3!jMA664gZRONCWn4sxSb3n)og94GO zhvwg{e&qYM((6RQ5EE&GncrSVm%*!(!OGr5?G;mWvJgn=kQbKj4}fYxom+T;Nb7yRyVSAe8^aI)~^ zcjEr?St0bahIxV(RNM^qhpu@G{mm&{e)28Xy)aBu;IgiXl}H6=iRR&w#DCMHbK zM9$?~48ueZpan1q2Q7`0299qVVnp|corm%%(7f*L+KA8q6zYB2prAmo31f$iPZ=6N zpkGz>wX|sqD=II@UGY0NQ!b;iFjN32I8ZUR@54JbFRwUt{@F>{HV4rgP0;`b;(Rz0 z*e1qC!n|2@nX9(nrg837OECo}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Q7r+Th3V9@F8`C7 zx_TxH4VIMf3nG+vHf$4kQQ^FAUHHo~#gtImiWedXLP3mc83+g&*h$#u^l1y5Nwf?NL)1F8H<%;y zYWid%rX)-;y?Zzh_3RPNvS0~wp8C)#y_-)B>>nN$3J%3_+u_(X3Oz*+*XL8km&{() z8dR zeAvU-K2b?XF}wDaII2?OHWOpsV7vDf%TFm8<57!PfW7$J34V_-J;a3QR?KkoC6R*Y zi+P!c5wkLtH8|&vde8>M`b|Z&llg0MA$@>t5F?N*Al-tI@FPUG7JMd?=%yu^X~|G} zK?{9XVY+nn7E(K~V>OTh6dkjsPlmiJ-?edvqc&%@(+guCZQnzjn)6Ef>Sgo5HAasZ z{P&O7KxN_IZ8ZKyb*Znqw5IwClbJQu$4usdzOq>YfEY?N;TJqK?B8mDx^ow;gCi-d z-o}@PI+z_H5SOmn3=W?-Y@kaGbYvNZRsow1dLjlq0)%fb&bH4sBPXx;*a<^!rs4}a zhTzEpsCUfdS9fgAgWNG`Tq67e4giem^>&f*H>!%;MGhjDzj67ff>Y^W49G7%(sOKQ zBxp}!=0B09y=@7FhH8I=E^H%EYtD>(A zlJ3@m{eliS2k2qv;dklsHOXq^bO%}1wz7Ai~ajkLG&dy}ozLj2GYg$r#^U(MVKg;J*>JTNrS;%iQblwJLDHr*|QipmAi4hr8Cr&v7(X9s+EknD8 zzr;3J`(C5$YyF>J+^}kw06Gw+kbI;3`2YX_07*qoM6N<$f)Zu1Y5)KL literal 0 HcmV?d00001 diff --git a/sources b/sources index af73e36..afa6e6e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1100d8a2f811777f38eff44fe6548d7e nginx-0.5.35.tar.gz +415e9bbc71e2ae36d9120af80112c5c1 nginx-0.6.30.tar.gz diff --git a/ssl.conf b/ssl.conf new file mode 100644 index 0000000..e5bbce1 --- /dev/null +++ b/ssl.conf @@ -0,0 +1,24 @@ +# +# HTTPS server configuration +# + +#server { +# listen 443; +# server_name _; + +# ssl on; +# ssl_certificate cert.pem; +# ssl_certificate_key cert.key; + +# ssl_session_timeout 5m; + +# ssl_protocols SSLv2 SSLv3 TLSv1; +# ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; +# ssl_prefer_server_ciphers on; + +# location / { +# root html; +# index index.html index.htm; +# } +#} + diff --git a/upstream-fair.conf b/upstream-fair.conf new file mode 100644 index 0000000..3909e96 --- /dev/null +++ b/upstream-fair.conf @@ -0,0 +1,18 @@ +# +# This is a sample configuration to use the nginx-upstream-fair module +# that is included. +# +# http://wiki.codemongers.com/NginxHttpUpstreamFairModule +# +# Change your Nginx config file's upstream block to include the 'fair' +# directive: +# + +# upstream mongrel { +# fair; +# server 127.0.0.1:5000; +# server 127.0.0.1:5001; +# server 127.0.0.1:5002; +# } + + diff --git a/virtual.conf b/virtual.conf new file mode 100644 index 0000000..479ff5e --- /dev/null +++ b/virtual.conf @@ -0,0 +1,15 @@ +# +# A virtual host using mix of IP-, name-, and port-based configuration +# + +#server { +# listen 8000; +# listen somename:8080; +# server_name somename alias another.alias; + +# location / { +# root html; +# index index.html index.htm; +# } +#} +