I have an nginx server running on ubuntu server. I have many websites and hundreds of pages hosted on the server. I want to execute one PHP function on each page when it is requested by a user. It is not feasible to add/call that function on all the websites and each & every page manually.
Is there a way in nginx where I can define which PHP file/function it should execute before serving the request to a user?