nginx. Test which location used to process request

后端 未结 3 1562
既然无缘
既然无缘 2020-12-28 14:56

I\'m wondering how do I know if a particular location[s] used to process request in nginx.

E.g.:

# 1
location / {}

# 2
location ~ /[\\w         


        
3条回答
  •  滥情空心
    2020-12-28 15:24

    The add_header trick is how I would do it to.

    I'm at work right now, so I can't test but you might possibly get something in the logfile i you set the error_log level to:

    • debug: you're nginx needs to be built using --with-debug for this to work, you can check that with the nginx -V command
    • notice: if debug logging isn't enabled

提交回复
热议问题