Skip to content

Commit

Permalink
nginx: readd it to the moonbase.
Browse files Browse the repository at this point in the history
  • Loading branch information
florin65 committed Nov 12, 2014
1 parent 051218e commit a8dafc6
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 0 deletions.
47 changes: 47 additions & 0 deletions web/nginx/BUILD
@@ -0,0 +1,47 @@
(

add_priv_user nginx:nginx -s /bin/false -c "nginx" &&

./configure --prefix=/usr \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin/nginx \
--pid-path=/run/nginx.pid \
--lock-path=/run/lock/nginx.lock \
--http-client-body-temp-path=/var/spool/nginx/client_body \
--http-proxy-temp-path=/var/spool/nginx/proxy \
--http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
--http-scgi-temp-path=/var/spool/nginx/scgi \
--http-uwsgi-temp-path=/var/spool/nginx/uwsgi \
--user=nginx \
--group=nginx \
--with-pcre-jit \
--with-file-aio \
--with-ipv6 \
--with-imap \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_sub_module \
--with-http_spdy_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_degradation_module \
--with-http_stub_status_module \
--with-http_secure_link_module \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log \
$OPTS &&

default_make &&

mkdir -p /var/spool/nginx/scgi &&
mkdir -p /var/spool/nginx/proxy &&
mkdir -p /var/spool/nginx/uwsgi &&
mkdir -p /var/spool/nginx/fastcgi &&
mkdir -p /var/spool/nginx/client_body &&

mkdir -p /var/log/nginx &&
mkdir -p /srv/www/htdocs &&
chown nginx:nginx /srv/www /var/log/nginx

) > $C_FIFO 2>&1
7 changes: 7 additions & 0 deletions web/nginx/DEPENDS
@@ -0,0 +1,7 @@
depends zlib
depends pcre

optional_depends "openssl" \
"--with-imap_ssl_module --with-http_ssl_module" \
"--without-imap_ssl_module --without-http_ssl_module" \
"for creating SSL connections"
15 changes: 15 additions & 0 deletions web/nginx/DETAILS
@@ -0,0 +1,15 @@
MODULE=nginx
VERSION=1.6.2
SOURCE=$MODULE-$VERSION.tar.gz
SOURCE_URL=http://nginx.org/download
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
SOURCE_VFY=sha256:b5608c2959d3e7ad09b20fc8f9e5bd4bc87b3bc8ba5936a513c04ed8f1391a18
WEB_SITE=http://nginx.org
ENTERED=20111228
UPDATED=20140918
SHORT="http server and reverse proxy"

cat <<EOF
nginx [engine x] is an HTTP and reverse proxy server, as well as a
mail proxy server, written by Igor Sysoev.
EOF
14 changes: 14 additions & 0 deletions web/nginx/init.d/nginxd
@@ -0,0 +1,14 @@
#!/bin/bash
#
# Startup script for the Nginx Web Server
#
# chkconfig: 345 85 15
# description: Nginx is a World Wide Web server. \
# It is used to serve HTML files and CGI.
# processname: nginx
# pidfile: /var/run/nginx.pid
# config: /etc/nginx/nginx.conf

ARGS="-c /etc/nginx/nginx.conf"

. /lib/lsb/init-functions $1
10 changes: 10 additions & 0 deletions web/nginx/logrotate.d/nginx
@@ -0,0 +1,10 @@
/var/log/nginx/*log {
missingok
create 640 http log
su http log
sharedscripts
compress
postrotate
test ! -r /run/nginx.pid || kill -USR1 `cat /run/nginx.pid`
endscript
}
17 changes: 17 additions & 0 deletions web/nginx/systemd.d/nginx.service
@@ -0,0 +1,17 @@
[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target

[Service]
Type=forking
PIDFile=/run/nginx.pid
PrivateDevices=yes
SyslogLevel=err

ExecStart=/usr/sbin/nginx -g 'pid /run/nginx.pid; error_log stderr;'
ExecReload=/usr/bin/kill -HUP $MAINPID
KillSignal=SIGQUIT
KillMode=mixed

[Install]
WantedBy=multi-user.target

0 comments on commit a8dafc6

Please sign in to comment.