Nginx as reverse proxy, Apche as webserver, Cloudflare as CDN and Amazon S3 as storage, is it even worth?

I was thinking about an Application that uses Apache as the main server and Nginx as a reverse proxy ( from what I understand by using them this way you can manage requests way faster than using just Apache but slower than using just Nginx). This application would need to store a lot of data: images, videos, audio and to do so I thought that the best way was to use Amazon S3. At this point, by setting Nginx caching right I think that the pages would load pretty fast right? But if I would be to use also Cloudflare wouldn’t it be even faster? So correct me if I’m wrong: For dynamic content: user -> Nginx -> Apache -> Nging -> user For Static content cached with Nginx: user -> Nginx -> user For Static content cached with CDN: user -> Nginx -> Cloudflare -> Nginx -> user For content that is not cached: user -> Nginx -> Cloudflare -> S3 -> Cloudflare -> Nginx -> user

Is it even worth creating and managing something like this?

I’m still learning and I couldn’t find anything like this on the internet so maybe I’m wrong and this doesn’t even make sense.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

I personally believe that this is a very solid setup.

As you are going to have a lot of static files, S3 storage along with Cloudflare and Nginx are a great choice!

If possible, I would personally probably try to drop Apache all together to remove one layer of complexity.

That way on your server itself, you would only have to manage Nginx.

Regards, Bobby