Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
nginx
GitHub Repository: nginx/nginx.org
Path: blob/main/xml/en/docs/faq/daemon_master_process_off.xml
1 views
1
<!--
2
Copyright (C) Nginx, Inc.
3
-->
4
5
<!DOCTYPE article SYSTEM "../../../../dtd/article.dtd">
6
7
<article name="Can I run nginx with &ldquo;daemon off&rdquo; or
8
&ldquo;master_process off&rdquo; settings
9
in a production environment?"
10
link="/en/docs/faq/daemon_master_process_off.html"
11
lang="en"
12
rev="1">
13
14
<section>
15
16
<para>
17
<initial>Q:</initial>
18
Can I run nginx with "daemon off" or "master_process off" settings
19
in a production environment?
20
</para>
21
22
<para>
23
&nbsp;
24
</para>
25
26
<para>
27
<initial>A:</initial>
28
First of all, both "daemon on|off" and "master_process on|off" directives were
29
intended to be used primarily for nginx code development.
30
</para>
31
32
<para>
33
While many people use "daemon off" in production it wasn’t really meant for
34
that. Since version 1.0.9 it is now quite safe to run nginx in production
35
with "daemon off", though. Bear in mind that non-stop upgrade is not an
36
option with "daemon off".
37
</para>
38
39
<para>
40
In a development environment, using "master_process off", nginx can run in
41
the foreground without the master process and can be terminated simply
42
with ^C (SIGINT). This is somewhat similar to running Apache with
43
an 'X' command-line option. However you should NEVER run nginx in production
44
with "master_process off".
45
</para>
46
47
</section>
48
49
</article>
50
51