I am a .NET developer who has recently started working in a LAMP environment. I know that if I go to www.somedomain.com/files/test.php, then (1) DNS resolves the URL to my server (2) my server handles the request on a given port (3) the server looks in /files/test.php and somehow runs test.php and returns the output of the file to the client. But it would be really great to understand this process in much more detail. For instance, does Apache/nginx actually run the php file or does it pass it to the php interpreter? Does every php file run every time or does the server cache its output? It would be really helpful to know the major details/decisions that a LAMP environment makes during this process. Kind of like this answer, which explains in detail how SSL works...https://security.stackexchange.com/questions/20803/how-does-ssl-work/20847#20847
What exactly happens on a LAMP machine when I request a php file?
php;lamp