Directive can have multiple meanings. Each variant is separated with horizontal line


[edit] include

Syntax: include file | mask
Default:
Context:
Reference: include


You can include any configuration files for what ever purpose you want.

Since 0.4.4, the include directive also supports filename globbing:

include vhosts/*.conf;

Note that until version 0.6.7, paths are relative to what was specified to configure via the --prefix=<PATH> directive, which by default is /usr/local/nginx. If you didn't set this when you compiled Nginx, then use absolute paths.

Since version 0.6.7, paths are relative to directory of nginx configuration file nginx.conf, but not to nginx prefix directory.


Module: CoreModule

[edit] include

Include a document from another source.

  <!--# include file="footer.html" -->
  <!--# include virtual="/remote/body.php?argument=value" -->

The target of "file" or "virtual" must be a location in the server configuration.

The distinction between "file" and "virtual" is mostly historical. "file" is the same as "virtual" with implied "wait" option. At one point the directives mirrored the Apache equivalents but now they are basically the same operation. Both can handle a URI and both can serve a static file.

Multiple requests will be issued in parallel. If you need them issued sequentially, use the "wait" option.

  <!--# block name="one" --> <!--# endblock -->
  <!--# include virtual="/remote/body.php?argument=value" stub="one" -->
  <!--# include virtual="/remote/body.php?argument=value" wait="yes" -->
  <!--# include virtual="/remote/body.php?argument=value" set="body" -->

Module: HttpSsiModule