Welcome! Log In Create A New Profile

Advanced

How to run multiple nginx master processes

Frank Church
November 08, 2010 05:48AM
I want to run multiple nginx master processes at boot time, based on this
script http://wiki.nginx.org/Nginx-init-ubuntu.

There are some variables at the top and I'd like to know if changing those
variables will make it successful.

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/nginx

PS="nginx"
PIDNAME="nginx" #lets you do $PS-slave
PIDFILE=$PIDNAME.pid #pid file
PIDSPATH=/var/run

DESCRIPTION="Nginx Server..."

RUNAS=root #user to run as

SCRIPT_OK=0 #ala error codes
SCRIPT_ERROR=1 #ala error codes
TRUE=1 #boolean
FALSE=0 #boolean

lockfile=/var/lock/subsys/nginx
NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"

Of these the most likely ones are


PS="nginx" #own comment - it is used to
reference the running process in killall etc
# I wonder if symlinking the
nginx binary and using that will stop the code
# from breaking
# it appears to be used for
locating the running process, and I suspect if it is not
#changed it will interfere
with the default proces
# hopefully nginx daemon does
use hardcoded references to its own name for
# process management

PIDNAME="nginx" #own comment - obvious need to avoid default binary
PIDFILE=$PIDNAME.pid #own comment - changed by
changing PIDNAME

PIDSPATH=/var/run # own comment - no need

DESCRIPTION="Nginx Server..." # own comment - can be
changed, but looks harmless

RUNAS=root # own comment - this can be
changed for a particular user

SCRIPT_OK=0 #own comment - no need - ala error codes
SCRIPT_ERROR=1 #own comment - no need - ala error codes
TRUE=1 #own comment - no need - boolean
FALSE=0 #own comment - no need - boolean

lockfile=/var/lock/subsys/nginx #own comment = has to be
different from default process
NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf" #own comment -
clearly needs to be different


Any opinions, has anyone tried it before?

/vfclists

------
--
Frank Church

=======================
http://devblog.brahmancreations.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to run multiple nginx master processes

Frank Church November 08, 2010 05:48AM

Re: How to run multiple nginx master processes

vesperto November 08, 2010 09:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready