Current Setup Single CentOS 6 VPS with 6G memory running apache 2.2, mariadb & PHP via FastCGI. Server has mostly wordpress sites, but also has some other PHP based sites. Right now we are not using HTTPS for any site, but plan to add it for authentication on PHP based sites.
- Are there any advantages to adding Nginx as reverse proxy (with or without caching) for static contents in front of apache + FastCGI on the same physical server? Apache does not have mod_php loaded, so it is already serving static pretty fast.
1a. What are the possible advantages of keeping apache in middle and keeping the apache-php relation to FastCGI.
1b. If we change the Apache-FastCGI, into Apache-mod_php, will there be any benefits? As apache's only task right now is serving dynamic contents, so will mod_php improve performance? As in case of Apache-FstCGI, apache has to ask a separate process (FastCGI) for parsing php, and in mod_php, apache process can parse php directly.
1c. Which server should handle the SSL stuff?
- If the apache is removed from the middle, and Nginx directly use php-fpm for dynamic contents, will there be any advantages?
- We are considering getting CloudFlare free plan to add CDN, so does it makes any sense to add nginx if there is CloudFlare at the front?