summaryrefslogtreecommitdiff
path: root/nginx
diff options
context:
space:
mode:
authorMatt Housh <jaeger@crux.ninja>2015-11-23 21:05:51 -0600
committerMatt Housh <jaeger@crux.ninja>2015-11-23 21:05:51 -0600
commit2237de289de10cdf149621e477d334c1619e5293 (patch)
treef6494f46d6a610af06ac295f4579219ca17eca49 /nginx
parentf54ae2e4dc43af9b4a5c68e89c7f408cdbbdfaea (diff)
downloadcontrib-2237de289de10cdf149621e477d334c1619e5293.tar.gz
contrib-2237de289de10cdf149621e477d334c1619e5293.tar.xz
nginx: assumed maintenance, updated to version 1.9.7
Diffstat (limited to 'nginx')
-rw-r--r--nginx/.footprint27
-rw-r--r--nginx/.md5sum6
-rw-r--r--nginx/Pkgfile85
-rw-r--r--nginx/nginx105
-rw-r--r--nginx/nginx.conf197
-rw-r--r--nginx/nginx.rc37
-rwxr-xr-xnginx/pre-install15
7 files changed, 169 insertions, 303 deletions
diff --git a/nginx/.footprint b/nginx/.footprint
index bf565e299..69f596c20 100644
--- a/nginx/.footprint
+++ b/nginx/.footprint
@@ -15,30 +15,9 @@ drwxr-xr-x root/root etc/nginx/html/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/nginx
drwxr-xr-x root/root usr/
-drwxr-xr-x root/root usr/bin/
--rwxr-xr-x root/root usr/bin/nginx
-drwxr-xr-x root/root usr/lib/
-drwxr-xr-x root/root usr/lib/perl5/
-drwxr-xr-x root/root usr/lib/perl5/site_perl/
-drwxr-xr-x root/root usr/lib/perl5/site_perl/5.18/
-drwxr-xr-x root/root usr/lib/perl5/site_perl/5.18/linux-thread-multi/
-drwxr-xr-x root/root usr/lib/perl5/site_perl/5.18/linux-thread-multi/auto/
-drwxr-xr-x root/root usr/lib/perl5/site_perl/5.18/linux-thread-multi/auto/nginx/
--r-xr-xr-x root/root usr/lib/perl5/site_perl/5.18/linux-thread-multi/auto/nginx/nginx.so
--r--r--r-- root/root usr/lib/perl5/site_perl/5.18/linux-thread-multi/nginx.pm
-drwxr-xr-x root/root usr/man/
-drwxr-xr-x root/root usr/man/man3/
--r--r--r-- root/root usr/man/man3/nginx.3pm.gz
+drwxr-xr-x root/root usr/sbin/
+-rwxr-xr-x root/root usr/sbin/nginx
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/log/
-drwxr-xr-x root/root var/log/nginx/
--rw-r--r-- root/root var/log/nginx/access.log (EMPTY)
--rw-r--r-- root/root var/log/nginx/error.log (EMPTY)
+drwxr-xr-x nginx/nginx var/log/nginx/
drwxr-xr-x root/root var/run/
-drwxr-xr-x root/root var/spool/
-drwxr-xr-x root/root var/spool/nginx/
-drwx------ nginx/root var/spool/nginx/client_body_temp/
-drwx------ nginx/root var/spool/nginx/fastcgi_temp/
-drwx------ nginx/root var/spool/nginx/proxy_temp/
-drwx------ nginx/root var/spool/nginx/scgi_temp/
-drwx------ nginx/root var/spool/nginx/uwscgi_temp/
diff --git a/nginx/.md5sum b/nginx/.md5sum
index 92f91779c..8735619f7 100644
--- a/nginx/.md5sum
+++ b/nginx/.md5sum
@@ -1,3 +1,3 @@
-169f1a4a3a67c83588c8d556e8407417 nginx
-3ca4a37931e9fa301964b8ce889da8cb nginx-1.8.0.tar.gz
-d922bb31d486e33d99381f3ff8e430be nginx.conf
+390586a36c8a510849527df106d857c0 nginx-1.9.7.tar.gz
+93b358681200fe294581cb559d529aee nginx.conf
+d640b1d5d4aad2d24f1e0d85bc5c6798 nginx.rc
diff --git a/nginx/Pkgfile b/nginx/Pkgfile
index 290a29499..92c37a95b 100644
--- a/nginx/Pkgfile
+++ b/nginx/Pkgfile
@@ -1,65 +1,38 @@
-# Description: Ultra fast HTTP and mail proxy server
-# URL: http://nginx.net/
-# Maintainer: Mikhail Kolesnik, mike at openbunker dot org
-# Depends on: perl libpcre openssl
+# Description: An HTTP and reverse proxy server
+# URL: http://nginx.org/
+# Maintainer: Matt Housh, jaeger at crux dot ninja
+# Depends on: libpcre zlib openssl
name=nginx
-version=1.8.0
+version=1.9.7
release=1
-source=(http://nginx.org/download/$name-$version.tar.gz
- $name.conf
- $name)
+source=(http://nginx.org/download/$name-$version.tar.gz \
+ $name.conf $name.rc)
build() {
- cd $name-$version
+ cd $name-$version
+ ./configure --prefix=/etc/$name \
+ --sbin-path=/usr/sbin/$name \
+ --conf-path=/etc/$name/$name.conf \
+ --error-log-path=/var/log/$name/error.log \
+ --http-log-path=/var/log/$name/access.log \
+ --pid-path=/var/run/$name.pid \
+ --lock-path=/var/lock/$name.pid \
+ --with-http_ssl_module \
+ --with-pcre \
+ --user=$name \
+ --group=$name
+ make
+ make DESTDIR=$PKG install
- ./configure \
- --prefix=/etc/$name \
- --sbin-path=/usr/bin/$name \
- --conf-path=/etc/$name/$name.conf \
- --pid-path=/var/run/$name.pid \
- --lock-path=/var/lock/$name.lock \
- --http-client-body-temp-path=/var/spool/$name/client_body_temp \
- --http-proxy-temp-path=/var/spool/$name/proxy_temp \
- --http-fastcgi-temp-path=/var/spool/$name/fastcgi_temp \
- --http-uwsgi-temp-path=/var/spool/$name/uwscgi_temp \
- --http-scgi-temp-path=/var/spool/$name/scgi_temp \
- --error-log-path=/var/log/$name \
- --http-log-path=/var/log/$name/access.log \
- --error-log-path=/var/log/$name/error.log \
- --user=$name \
- --group=$name \
- --with-pcre \
- --with-zlib-asm=pentiumpro \
- --with-http_gzip_static_module \
- --with-http_ssl_module \
- --with-http_realip_module \
- --with-http_addition_module \
- --with-http_sub_module \
- --with-http_flv_module \
- --with-http_stub_status_module \
- --with-http_perl_module
+ install -d -m 0755 $PKG/var/log/$name
+ install -D -m 0644 -o root -g root $SRC/$name.conf \
+ $PKG/etc/$name/$name.conf
- make
- make DESTDIR=$PKG install
-
- install -d -m 0700 -o $name \
- $PKG/var/spool/$name/{client_body_temp,fastcgi_temp} \
- $PKG/var/spool/$name/{uwscgi_temp,scgi_temp,proxy_temp}
-
- touch $PKG/var/log/$name/access.log
- touch $PKG/var/log/$name/error.log
-
- install -m 0644 $SRC/$name.conf $PKG/etc/$name/$name.conf
- install -m 0755 -D $SRC/$name $PKG/etc/rc.d/$name
-
- rm -f $PKG/etc/$name/*.default
+ install -D -m 0755 -o root -g root $SRC/$name.rc \
+ $PKG/etc/rc.d/$name
- find $PKG -type f \( \
- -name '.packlist' -o \
- -name '*.bs' -o \
- -name 'autosplit.ix' -o \
- -name 'perllocal.pod' \) -delete
-
- find $PKG/usr/lib/perl5 -depth -type d -empty -delete
+ find $PKG/etc/$name -name "*.default" -delete
+
+ chown $name:$name $PKG/var/log/$name
}
diff --git a/nginx/nginx b/nginx/nginx
deleted file mode 100644
index 961daf86f..000000000
--- a/nginx/nginx
+++ /dev/null
@@ -1,105 +0,0 @@
-#
-# /etc/rc.d/nginx
-#
-# Adopted from Fedora Core
-
-LOCKFILE=/var/lock/nginx.lock
-PIDFILE=/var/run/nginx.pid
-RETVAL=0
-MAXOPENFILES=16384
-
-NGINX=/usr/bin/nginx
-
-start()
-{
- if [ -s $PIDFILE ]; then
- echo "Nginx is already running"
- exit 1
- fi
-
- # nginx can work with many files at one time
- ulimit -n $MAXOPENFILES
-
- $NGINX &>/dev/null
- RETVAL=$?
-}
-
-stop() {
- kill -QUIT `cat $PIDFILE` &>/dev/null
- RETVAL=$?
-}
-
-restart()
-{
- stop
- sleep 1
- start
- RETVAL=$?
-}
-
-reload() {
- kill -HUP `cat $PIDFILE`
- RETVAL=$?
-}
-
-testconfig()
-{
- $NGINX -t
- RETVAL=$?
-}
-
-# this is not enabled; requires more testing
-upgrade()
-{
- testconfig
- RETVAL=$?
- if [ $RETVAL -eq 0 ]; then
- echo -n $"Sending USR2 signal to upgrade nginx "
- kill -USR2 `cat $PIDFILE`
- RETVAL=$?
- echo
- else
- RETVAL=1
- fi
-}
-
-rotate() {
- # it's too verbose when we are called from cron/logrotate and
- # causes useless E-mail warnings in some setups
- #echo -n $"Sending USR1 signal to rotate logs "
- kill -USR1 `cat $PIDFILE`
- #echo
- RETVAL=$?
-}
-
-case "$1" in
-start)
- testconfig
- RETVAL=$?
- [ $RETVAL -eq 0 ] && start
-;;
-stop)
- stop
-;;
-reload)
- testconfig
- RETVAL=$?
- [ $RETVAL -eq 0 ] && reload
-;;
-restart)
- restart
-;;
-rotate)
- rotate
- RETVAL=$?
-;;
-testconfig)
- testconfig
- RETVAL=$?
-;;
-*)
- echo "Usage: $0 {start|stop|reload|restart|rotate|testconfig}"
- RETVAL=1
-esac
-
-exit $RETVAL
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 12db6c269..7dba8c085 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -1,105 +1,116 @@
#
-# /etc/nginx/nginx.conf
+# /etc/nginx/nginx.conf - nginx server configuration
#
+
user nginx;
-worker_processes 4;
+worker_processes auto;
+
+error_log /var/log/nginx/error.log;
+
+pid /var/run/nginx.pid;
-error_log /var/log/nginx/error.log info;
events {
- worker_connections 4096;
+ worker_connections 1024;
}
+
http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
-
- access_log /var/log/nginx/access.log combined;
-
- gzip on;
- #tcp_nopush on;
- sendfile on;
-
- keepalive_timeout 65;
-
- #passenger_root /usr/share/nginx/passenger;
-
- server {
- listen 80;
- server_name localhost;
- location / {
- root html;
- index index.html index.htm;
- }
- error_page 404 /404.html;
-
- # redirect server error pages to the static page /50x.html
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root html;
- }
-
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
- #
- #location ~ \.php$ {
- # proxy_pass http://127.0.0.1;
- #}
- #
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- #
- #location ~ \.php$ {
- # fastcgi_pass 127.0.0.1:9000;
- # fastcgi_index index.php;
- # include fastcgi_params;
- # fastcgi_param SCRIPT_FILENAME /srv/www/nginx/html$fastcgi_script_name;
- #}
- #
- # deny access to .htaccess files, if Apache's document root
- # concurs with nginx's one
- #
- #location ~ /\.ht {
- # 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;
- # }
- #}
+ include mime.types;
+ default_type application/octet-stream;
-}
+ #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 /var/log/nginx/access.log;
+
+ sendfile on;
+ #tcp_nopush on;
+
+ keepalive_timeout 65;
+
+ gzip on;
+
+ server {
+ listen 80;
+ server_name localhost;
+
+ #charset koi8-r;
+
+ location / {
+ root html;
+ index index.html index.htm;
+ }
+
+ error_page 404 /404.html;
+
+ # redirect server error pages to the static page /50x.html
+ #
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
-# End of file \ No newline at end of file
+ # proxy the PHP scripts to Apache listening on 127.0.0.1:80
+ #
+ #location ~ \.php$ {
+ # proxy_pass http://127.0.0.1;
+ #}
+
+ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
+ #
+ #location ~ \.php$ {
+ # root html;
+ # fastcgi_pass 127.0.0.1:9000;
+ # fastcgi_index index.php;
+ # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
+ # include fastcgi_params;
+ #}
+
+ # deny access to .htaccess files, if Apache's document root
+ # concurs with nginx's one
+ #
+ #location ~ /\.ht {
+ # 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 ssl;
+ # server_name localhost;
+
+ # ssl_certificate cert.pem;
+ # ssl_certificate_key cert.key;
+
+ # ssl_session_cache shared:SSL:1m;
+ # ssl_session_timeout 5m;
+
+ # ssl_ciphers HIGH:!aNULL:!MD5;
+ # ssl_prefer_server_ciphers on;
+
+ # location / {
+ # root html;
+ # index index.html index.htm;
+ # }
+ #}
+
+}
diff --git a/nginx/nginx.rc b/nginx/nginx.rc
index 0673e7c4f..fbc258959 100644
--- a/nginx/nginx.rc
+++ b/nginx/nginx.rc
@@ -1,22 +1,31 @@
#
-# /etc/rc.d/nginx: start, stop or retart nginx server
+# /etc/rc.d/nginx: start, stop or restart nginx server
#
case $1 in
start)
- if [ -s /var/run/nginx.pid -a ! -z "`pgrep nginx`" ]
- then
- echo "nginx is already running"
- exit 1
- fi
- /usr/sbin/nginx
- ;;
+ PID="`pidof nginx`"
+ if [ -s /var/run/nginx.pid -a -n "$PID" ]; then
+ echo "nginx is already running"
+ exit 1
+ fi
+ /usr/sbin/nginx
+ ;;
stop)
- /usr/sbin/nginx -s quit
- ;;
+ /usr/sbin/nginx -s quit
+ ;;
+ restart)
+ $0 stop; sleep 1; $0 start
+ ;;
+ status)
+ PID="`pidof nginx`"
+ if [ -s /var/run/nginx.pid -a -n "$PID" ]; then
+ echo "nginx is running. PID(s) = $PID"
+ else
+ echo "nginx is not running."
+ fi
+ ;;
*)
- echo "usage: nginx [start|stop]"
- ;;
+ echo "usage: nginx [start|stop|restart]"
+ ;;
esac
-
-# End of file
diff --git a/nginx/pre-install b/nginx/pre-install
index e8c5c7e03..ae94ba081 100755
--- a/nginx/pre-install
+++ b/nginx/pre-install
@@ -1,11 +1,10 @@
#!/bin/sh
-ADD_USER=nginx
-ADD_USER_HOME=/etc/nginx
-ADD_USER_SHELL=/bin/false
-ADD_GROUP=nginx
+if [ -z `getent group nginx` ]; then
+ groupadd --system nginx
+fi
-set -x -u -e
-
-/usr/sbin/groupadd --system --force $ADD_GROUP
-/usr/sbin/useradd --system --home $ADD_USER_HOME --shell $ADD_USER_SHELL --gid $ADD_GROUP $ADD_USER
+if [ -z `getent passwd nginx` ]; then
+ useradd -r -g nginx -d /etc/nginx -s /bin/false -c "nginx server" nginx
+ passwd -l nginx
+fi

Generated by cgit