From 4354b0d3eba5cdb4c37e5bb6276225681c331a64 Mon Sep 17 00:00:00 2001 From: jjh Date: Mon, 12 May 2008 04:40:35 +0000 Subject: [PATCH] Update to new upstream stable branch update to 0.6 upstream stable branch add default index.html and error pages --- 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.init | 35 ++++++++-- poweredby.png | Bin 0 -> 3034 bytes ssl.conf | 24 +++++++ upstream-fair.conf | 18 +++++ virtual.conf | 15 +++++ 11 files changed, 591 insertions(+), 52 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 poweredby.png create mode 100644 ssl.conf create mode 100644 upstream-fair.conf create mode 100644 virtual.conf 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>/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/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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/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; +# } +#} +