That really depends on the web server, and the web app you'd otherwise be writing. If it's a shitty static web server, than a JVM or BEAM based web app might be safer actually.

Uh, yeah, I thought about Nginx or Apache and would expect them to be more secure then your average self-written application.