unit icon indicating copy to clipboard operation
unit copied to clipboard

Router: Log router steps needed to find right action step

Open tippexs opened this issue 2 years ago • 1 comments

It would be very helpful to log the steps the Unit router takes to find the correct route for an incoming request to the unit.log.

The idea behind this is similar to the idea of NGINX creating rewrite logs. http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#rewrite_log

This issue is open for discussions and other ideas. The final output could be similar to the NGINX log output.

tippexs avatar Sep 23 '22 06:09 tippexs

One thing I was missing was the trailing "/*" in the URI

        {
            "match": {
                "uri": "/example_php/*"
            },            
            "action": {
                "pass": "applications/example_php"
            }
        }

Without it the access appears to be silently ignored with it the access is attempted and an error message describing the issue is reported

mwoodpatrick avatar Oct 01 '22 18:10 mwoodpatrick

Router diagnostic logging shipped with unit-1.30.0

lcrilly avatar May 16 '23 10:05 lcrilly