0

I'm trying to figure out what would be the most performing configuration to host a PHP website on Amazon EC2.

Which webserver? (Apache, Lighttpd, nginx)? Which PHP module? mod_php, FastCgi? Which OpCache? (xcache, APC, eAccelerator, Varnish)

What would you recommended setup would look like?

1 Answers1

0
  1. It depends on your application running on the server. Needs much more memory or cpu or both?

  2. Nginx + PHP-FPM + Varnish-Cache is a good solution if you can use them effectively.

  • I would use it with either Wordpress or ForkCMS. – user3293728 Feb 10 '14 at 17:11
  • I also saw around that there are guides to setup nginx + php-fpm + apc + varnish. Does it make sense to add both varnish and apc? And what about memcache, does it make sense to have that too? – user3293728 Feb 10 '14 at 17:19
  • No it doesn't. There is no need to use apc in that configuration, because varnish is already caching pages and serves then from memory. I also use Redis for memory based object caching which is better than memcache i think – Ali Topaloğlu Feb 15 '14 at 09:46
  • Varnish can't do opcode caching. – Andrea Dec 08 '15 at 13:46