Reputation: 644
For an application I'm helping architect we wanted to use nginx + unicorn as part of our server stack. We've heard good things about the speed at which nginx can serve static files. Unfortunately part of our authentication process requires an apache server. Would it be acceptable to still use nginx, but then have apache between nginx and unicorn or is that just getting ridiculous? I don't know how that would affect performance.
Upvotes: 0
Views: 284
Reputation: 6682
If your application requires Apache to function, use Apache. Apache serves static files just fine.
Worry about performance optimizations once your codebase is stable. Nine times out of ten, your code is the cause of performance issues, not your choice of web server, and certainly not its ability to serve static files. If you are serving so many static files that performance is a concern, host them externally (Amazon S3?) or use a CDN.
Upvotes: 1