Nginx startup scripts
mark at quarella.co.uk
Mon Jun 28 12:26:09 MSD 2010
On 27/06/10 15:10, Rahul Bansal wrote:
>> > I note from the documentation that it is fairly simple to run multiple
>> > instances of nginx behind a proxy to allow different virtual hosts to be
>> > managed as different users (to prevent code on one site having read/write
>> > access to other sites).
> Can u please share link to the page where you find that info?
> I am, from long time, thinking about replacing apache with nginx in
> shared-hosting environment.
I may have overstated the "fairly simple" as I haven't found specific
documentation, but I was referring to the comments at
(extract below). I would like to see an example configuration myself if
anyone can point me in the right direction.
*Is support for chroot planned?*
Unknown at this time. Unless/until that changes, you can achieve a
similar - or better - effect by using OS-level features (e.g. BSD Jails,
OpenVZ w/ proxyarp on Linux, etc.).
*What about support for something like mod_suexec? What about support
for something like mod_suexec?*
mod_suexec is a solution to a problem that Nginx does not have. When
running servers such as Apache, each instance consumes a significant
amount of RAM, so it becomes important to only have a monolithic
instance that handles all one's needs. With Nginx, the memory and CPU
utilization is so low that running dozens of instances of it is not an
A comparable Nginx setup to Apache + mod_suexec is to run a separate
instance of Nginx as the CGI script user (i.e. the user that would have
been specified as suexec user under Apache), and then proxy to that from
the main Nginx instance.
Alternatively, PHP could simply be executed through FastCGI, which
itself would be running under a CGI script user account. (Note that
mod_php - the module suexec is normally utilized to defend against -
does not exist with Nginx.)
Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) @ 13 Clarke Rd, Milton Keynes, MK1 1LG
More information about the nginx