default_type

Syntax: default_type mime-type; Default: default_type text/plain; Context: http, server, location Defines the default MIME type of a response. Mapping of file name extensions to MIME types can be set with the types directive.

debug_points

Syntax: debug_points abort | stop; Default: — Context: main This directive is used for debugging. When internal error is detected, e.g. the leak of sockets on restart of working processes, enabling debug_points leads to a core file creation (abort) or to stopping of a process (stop) for further analysis using a system debugger.

debug_connection

Syntax: debug_connection address | CIDR | unix:; Default: — Context: events Enables debugging log for selected client connections. Other connections will use logging level set by the error_log directive. Debugged connections are specified by IPv4 or IPv6 (1.3.0, 1.2.1) address or network. A connection may also be specified using a hostname. For connections using UNIX-domain sockets (1.3.0, 1.2.1), debugging log is enabled by the “unix:” parameter. events { debug_

Debugging nginx with DTrace pid provider

Debugging nginx with DTrace pid provider This article assumes the reader has a general knowledge of nginx internals and DTrace. Although nginx built with the --with-debug option already provides a lot of information about request processing, it is sometimes desirable to trace particular parts of code path more thoroughly and at the same time omit the rest of debugging output. DTrace pid provider (available on Solaris, Mac OS X) is a useful tool to explore userland program’s internals, since

dav_methods

Syntax: dav_methods off | method ...; Default: dav_methods off; Context: http, server, location Allows the specified HTTP and WebDAV methods. The parameter off denies all methods processed by this module. The following methods are supported: PUT, DELETE, MKCOL, COPY, and MOVE. A file uploaded with the PUT method is first written to a temporary file, and then the file is renamed. Starting from version 0.8.9, temporary files and the persistent store can be put on different fil

dav_access

Syntax: dav_access users:permissions ...; Default: dav_access user:rw; Context: http, server, location Sets access permissions for newly created files and directories, e.g.: dav_access user:rw group:rw all:r; If any group or all access permissions are specified then user permissions may be omitted: dav_access group:rw all:r;

daemon

Syntax: daemon on | off; Default: daemon on; Context: main Determines whether nginx should become a daemon. Mainly used during development.

create_full_put_path

Syntax: create_full_put_path on | off; Default: create_full_put_path off; Context: http, server, location The WebDAV specification only allows creating files in already existing directories. This directive allows creating all needed intermediate directories.

Converting rewrite rules

Converting rewrite rules Converting Mongrel rules

Controlling nginx

Controlling nginx Changing Configuration Rotating Log-files Upgrading Executable on the Fly nginx can be controlled with signals. The process ID of the master process is written to the file /usr/local/nginx/logs/nginx.pid by default. This name may be changed at configuration time, or in nginx.conf using the pid directive. The master process supports the following signals: TERM, INT fast shutdown QUIT graceful shutdown HUP changing configuration, keeping up with a changed time zone (only for