DEV Community

Krishna Modi
Krishna Modi

Posted on

3 1

Nginx with Brotli and ModSecurity

Are you using Docker for your next deployment?

How about web server? Nginx? Good choice!

But how do you manage security?

Docker is secured already? Myth! Wake up

Yes, you need to handle your own security, Docker ain't gonna do shit to help you secure things up with public accessibility to your endpoints.

Well, I recently bumped up into Nginx ModSecurity module and found it amazing.

It handles a ton of vulnerabilities and keeps your app secure from a major web and SQL vulnerabilities which otherwise were not handled by nginx default.

Also, Brotli is a much better compression offered by Google, gives 20% extra compression as compared to GZip.

Wow! isn't it? So how do you use this in your deployment?

It takes a lot of building and compiling and configuring to get this working. 15 mins of minimum build time guaranteed!

Don't worry, I've got your back and build a Docker image for you with all these together.

Try https://github.com/krish512/docker_nginx_modsecurity,

Latest Nginx with Modsecurity v3 and Brotli compression level 11

PS: Not really promoting my repo, just helping the community with my contribution and expecting PRs raised towards the repo to make it more feature-rich.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay