There are several ways to associate a web server with PHP.
For Apache HTTP Server most popular is "mod_php". This module is actually PHP itself, but compiled as a module for the web server, and therefore it loads directly into it. Since with mod_php, PHP loads directly into Apache if Apache is going to handle concurrency using its Worker MPM (i.e. using Threads)
And here is a trap for things like setlocale() .
With Nginx you will not be able to embed PHP in it. Consequently, PHP is completely outside the web server with several PHP processes .
And this is good, because PHP can do something at a lower level, for example, change locales and setlocale() NOT thread-oriented.
Yevgeniy Afanasyev
source share