nginx. Test which location used to process request

If you just want to see which block was used, and don’t care about returning otherwise valid results, it might be more straight-forward to use return rather than add_header.

location / {
    return 200 'location 1';
}

location ~ /(\w+\-)\.html {
    return 200 'location 2';    
}

location @named {
    return 200 'location named';
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)