You'll need a C library, a small handful of C libraries, a web-server and the Linux kernel. SSH would be good, possibly git as well depending on the way you deploy. Ignoring any need for a GUI, I think you could get a rather small system.
I also neglected to mention any sort of shell. Dash, I believe, is POSIX compliant and rather tiny.