How to run multiple nginx master processes

Frank Church vfclists at
Mon Nov 8 13:45:14 MSK 2010

I want to run multiple nginx master processes at boot time, based on this

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


PIDNAME="nginx"				#lets you do $PS-slave
PIDFILE=$                    #pid file

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


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=$                    #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?


Frank Church

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list