Forum: NGINX include files relative to nginx.conf

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Joaquin Cuenca Abela (Guest)
on 2008-11-16 18:29
(Received via mailing list)

the docs say that "Since version 0.6.7, paths are relative to
directory of nginx configuration file nginx.conf, but not to nginx
prefix directory."

I have nginx.conf 0.7.21 in directory C:\foo\etc\windows\nginx.conf
and I run nginx with:

nginx -c C:\foo\etc\windows\nginx.conf

In nginx.conf I have an include as in:

location / {
  include fastcgi.conf;

I was expecting nginx to open the fastcgi.conf file in
C:\foo\etc\windows\fastcgi.conf, but instead it opens the fastcgi.conf
in C:\nginx\conf\fastcgi.conf
I guess it's not a linux / win difference, but I can try in linux if
you want to double check.

Am I misunderstanding the docs expecting include to include files
relative to the directory where nginx.conf is located? any
work-arounds to have the entire configuration in different directories
having relative paths in the includes?

This topic is locked and can not be replied to.