Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which prefix does NGINX use for "include"?

Tags:

nginx

While I'm compiling NGINX, I get this message:

nginx path prefix:          "/tmp/app"
nginx binary file:          "/tmp/app/progs/nginx/sbin/nginx"
nginx configuration prefix: "/tmp/app/progs"
nginx configuration file:   "/tmp/app/progs/nginx.conf"

Does NGINX use the path prefix or the configuration prefix for include directives in nginx.conf?

like image 553
dgo.a Avatar asked Apr 11 '16 15:04

dgo.a


People also ask

What is nginx prefix?

–prefix=*path*defines a directory that will keep server files. This same directory will also be used for all relative paths set by configure (except for paths to libraries sources) and in the nginx. conf configuration file. It is set to the /usr/local/nginx directory by default.

Which config file does Nginx use?

By default, the configuration file is named nginx. conf and placed in the directory /usr/local/nginx/conf , /etc/nginx , or /usr/local/etc/nginx .

Where is the Nginx root?

On a fresh installation of Nginx, the document root is located at /var/www/html . By following the prerequisite guides, however, you created a new document root, /var/www/ your_domain /html . You may have additional document roots as well.

What is Nginx document root?

The root directive specifies the root directory that will be used to search for a file. To obtain the path of a requested file, NGINX appends the request URI to the path specified by the root directive.


1 Answers

The documentation suggests that it's the "prefix path":

–prefix=path defines a directory that will keep server files. This same directory will also be used for all relative paths set by configure (except for paths to libraries sources) and in the nginx.conf configuration file. It is set to the /usr/local/nginx directory by default.

By contrast:

–conf-path=path sets the name of an nginx.conf configuration file. If needs be, NGINX can always be started with a different configuration file, by specifying it in the command-line parameter -c file. By default the file is named prefix/conf/nginx.conf.

However, this is a documentation bug, and your include paths will in fact be relative to the "config path".

like image 198
Lightness Races in Orbit Avatar answered Nov 15 '22 03:11

Lightness Races in Orbit