Hello!
> I have a question regarding stacking phase directives in multiple contexts. I have tried to put access_by_lua_block within http context and then another
> block access_by_lua_file within location context expecting both blocks will execute.
> I am observing that only location context block gets executed. Is that an expected behavior?
Yes, that's an expected behavior, the access_by_lua* directive inside a location has the higher priority than the one inside http block.