Use Nginx or Apache for serving dynamic content? [

2019-04-07 16:46发布

问题:

If one were developing a website today (summer 2012), should you use Apache or Nginx for serving the dynamic content (PHP)?

What are pros and cons of Apache and Nginx for the following scenarios:

  1. using reverse-proxy from Nginx to Apache, straightup Nginx, straight-up Apache.
  2. Push notifications: What if you want to offer real-time functionality like chat or notifications?
  3. Operating systems: I choose Amazon EC2 instance with Linux AMI or Ubuntu as the OS, but would it matter if I were using a different service for the hosting?

This is considering there is no restriction of which version of Apache and Nginx can choose.