Yes, though you would need a bundle called OpenResty (openresty.org)
that comes with nginx, LUA and some patches to make it all work
smoother.
You will lose some features that standard nginx comes with, like http2.
I’m working on my own project with it. Though I would recommend against
using MySQL, but consider either a file-based storage with a shared
dictionary inside nginx as cache, and/or use redis as backend.
There’s a few articles on it, I was working on one myself as I’m going,
and it’s in no way perfect (plus I made some changes already):