How to find out in which directory the nginx site is looking. The fact is that my site gives out 404. I would like to know in which directory nginx is looking for a site, maybe I messed up a little something, maybe there is an opportunity to debug?
1 answer
If the usual error log (the default /var/log/nginx/error.log , or the required server block specified in the error_log directive) is not enough, you can turn on the debug log, there is VERY much information in it. In particular, it is useful when debugging confusion with location . To enable the debug log, you need to add debug to the error_log directive, like this:
error_log /path/to/log debug; I think it makes no sense to retell the beautiful (and nginx Russian-language documentation: http://nginx.org/ru/docs/debugging_log.html
You may also find this nginx documentation section: http://nginx.org/ru/docs/http/ngx_http_core_module.html#location
|
locationit should be processed and what is indicated there. - MANK/var/log/nginx/access.logand/var/log/nginx/error.log- aleksandr barakin