A web server is responsible for:
Providing space and resources for a website: All the files that make up a website, reside on the file system of a web server. It also provides the RAM and CPU resources required by a website.
Makes a website accessible online: Whenever someone enters a website’s address in their browser, a request is sent to the webserver. The web server then generates the response, which displays the website on the user’s browser.
Protects your website’s files: It’s a web server’s responsibility to protect your website’s files and other assets. By using firewalls and access control lists, it ensures that only people with authorised access get to log in and view/edit the website files.
Runs other necessary applications: A web server also runs other tools and applications that your website requires. This includes everything from vulnerability scanners that protect your website from cyberattacks to backup solutions that prepare incremental backups.