Amazon Linux + Apache + PHP-FPM = Confusion!
I have a server running Amazon Linux 2012.03 and Apache 2.2.22 (among other things). I use it as a server to host some simple websites through VirtualHosts, including some Wordpress websites. I've installed PHP 5.3.15, and APC to speed things up. Then I read about PHP-FPM and it seemed like a way to increase speed some more, so I wanted to install it. After reading around 8 different guides or so, the confusion has only gotten bigger and bigger.
I think that part of the confusion is the different distro's and their differences in how certain things work/need to be set up, but also the fact that PHP-FPM is now part of PHP as I understand. The documentation about FPM on the PHP website is... not much and confusing as well. And of course I'm missing some fundamentals that makes me not understand or misunderstand things I read. Oh and finally, a lot of guides focus on the combination of nginx and FPM, but I want to keep Apache as I'm still learning something new about that every day :)
How far I've gotten: I've installed PHP-FPM and it's running, I see 6 php-fpm processes running when I use top. I've altered the config to have it use a socket as well (from one of the guides I found). However, I don't have the feeling that php-fpm is actually being used. I read that a phpinfo file should output something FPM related instead at Server API, instead of Apache 2.0 Handler as it does now. So one thing I would like to learn is how to know if FPM is correctly set up, and actually being used.
I'm not sure, but from the guides I've read, I get the idea that part of the challenge is that I'm using VirtualHosts. Some guides say that lines need to be added to each VirtualHost block, something like FastCGIExternalServer, but my Apache doesn't recognize that. Probably because FastCGI isn't loaded. Then I look into that and some guides don't talk about FastCGI at all. Others mention fcgi, but I'm not sure if this is the same thing. So another thing I would like to learn is the difference/relation between CGI, FastCGI (, fcgi?) and FPM, as I always thought that FPM was a 'better' alternative to FastCGI, which is a better alternative to CGI?
- My goal is to have FPM being used by my Apache VirtualHosts
- I want to learn how to know if FPM is correctly set up/being used
- I want to learn the difference/relation between CGI, FastCGI, fcgi and FPM
I hope you guys can help me! Let me know which information you need. Thanks in advance!
Not really the kind of answer you'd expect but if that's compatible with your clients I would install PHP 5.4.7 in the hope that FPM be better integrated with it.
|All times are GMT -5. The time now is 06:49 PM.|