Forum: NGINX include files relative to nginx.conf

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9b00f51690317f558866550b0f499da6?d=identicon&s=25 Joaquin Cuenca Abela (Guest)
on 2008-11-16 17:29
(Received via mailing list)
Hi,

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?

Thanks!
This topic is locked and can not be replied to.