I have intalled nginx on Windows and put an nginx.conf
in my http root directory, but it seems this path is not included, I can include it by including c:/http_default/nginx.conf
, but I want nginx to automaticaly include any nginx.conf
for current working directory. Example: for http://mydomain.com/test/index.php
, I want c:/http_default/test/nginx.conf
to be included.
Your best option is to first have standardized directory structure (e.g. c:\www\example.com ). Then in each site directory have a directory for your root and for conf files. Then you'd use this in your main nginx.conf http { } section.
include c:/www/*/conf/nginx.conf;
Then each site's nginx.conf will get loaded when you start or issue a reload to nginx. So if you have these two paths for a site, you are set.
c:\www\example.com\conf\
c:\www\example.com\htdocs\
Web files go in htdocs and nginx.conf goes in conf. Simple as that.
I never used nginx on Windows, so I assume its' conf uses forward slashes like *nix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With