I’m the Apache user for the many years and using the Yii framework on Apache. I’m keep on hearing that Nginx serves the content very fast comparing to Apache. But I would like to know, what the Yii community thinks about using Nginx than Apache? Which one is good for Yii frameowrk? my ultimate goal is to serve the contents very fast.
If your webapp has a lot of users you should probably use Nginx, if not you can still use apache. Apache is still good. You can see the comparison here.
For my project I first rented out an inexpensive 1 GB RAM CentOS virtual server and used Apache. Even with a single Yii app it kept hitting the memory limit and crashing. Then I switched to to nginx and am currently hosting 3 Yii apps and everything runs on 600 MB RAM. I can’t say much about performance because the apps are lightly loaded, but I reckon it’s better.
Note that a common scenario is to use nginx as a front end to serve dynamic pages such as Yii apps with Apache on the back end to serve static pages. It’s the integrated PHP support in Apache that slows it down, so the FastCGI approach nginx uses is more efficient. I don’t have that situation so I haven’t tried it. YMMV…