Very roughly: A Linux system speaks UNIX. It gives you the ability to run UNIX programs by offering the syscalls open()
, malloc()
, socket()
etc. etc.
A web server like nginx speaks HTTP - it implements the commands GET/PUT/POST etc. that you use for internet browsing or for running REST applications.
UNIX is extremely powerful, but it doesn't contain all functionality in the world. It is simply much more efficient to develop and install an operating system and application programs separately than to write one, extremely huge, system that does everything. If UNIX came with all the programs that can run on UNIX, it would be 1000GB large and take a month to install. Nobody wants that, so we compromise by distributing operating systems and applications separately, and everyone can pick the applications they actually want.
The fact that both are called 'server' is confusing, but in the end 'server' means nothing more than that a component exposes functionality that other components or users can use to create even smarter components. Under this perspective, pretty much all software is a server of some kind. For instance, REST applications build on top of the services that web servers and browsers offer, so the hierarchy can be in three levels or even more.