1

MDN states that a web server is a computer hosting one or more websites. However, in the CS50 lecture on Flask, at 41:37, Brian mentioned that the Flask class was imported from the flask module to create a web server. This is pretty confusing and I would like to know what is it actually a web server. Is a web server referring to a computer or is it referring to the flask web-app that we are creating using python?

Thanks.

2 Answers 2

2

https://en.m.wikipedia.org/wiki/Web_server

A web server is server software, or hardware dedicated to running said software, that can satisfy World Wide Web client requests. A web server can, in general, contain one or more websites. A web server processes incoming network requests over HTTP and several other related protocols.

As David Malan says that web server is a piece of software written by people.

So you can as well implement your own web server on your computer and host your web sites.

The flasks web server is an already implemented server by other group of people for the benefit of them or you.

You borrowed the implemented web server just to serve your assignment or project files because you didn't want to implement your own.

To answer your question. web server can refer to the software that serves up website data, or the hardware that serves the data, or both.

So flask web-app is a software which can be used on your computer to perform its purposes, and its purpose is to serve files on your computer.

Apache, flask web-server etc. are examples of a web server. Apache is not a computer so it shouldn't run another web server.

The Apache HTTP Server, colloquially called Apache, is free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation.

Wikipedia License: Apache License 2.0

Initial release date: April 1995

Written in: C, XML, C++.

8
  • Do you get my explanation?
    – myckhel
    Feb 24, 2019 at 7:59
  • 3
    Good explanation, except that I would argue that a web server can refer to the software that serves up website data, or the hardware that serves the data, or both. It always depends on the context of what you're discussing. (You started down this road and then turned left. ;-) )
    – Cliff B
    Feb 24, 2019 at 12:27
  • @myckhel: I am still a little confused. So, based on your explanation, what I have understood is that, the web application that we have written using Flask and Python is actually a web server. But, if that's the case, why is Apache and Nginx are also called web servers on the Internet? Wouldn't it be a little weird to have a web server to run on a web server, i.e. a web application written using Flask and Python to run on let's say Apache? Feb 24, 2019 at 14:10
  • The Apache HTTP Server, colloquially called Apache, is free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. Wikipedia License: Apache License 2.0 Initial release date: April 1995 Written in: C, XML, C++.
    – myckhel
    Feb 24, 2019 at 15:03
  • I would say that I am with @Cliff B, since we can refer to a server as a highly specialized machine, specifically built for this purpose.
    – MARS
    Feb 24, 2019 at 19:13
0

A web server delivers content for a website to a client that requests it, like a web browser. A web server communicates with a web browser using HTTP. visit our website web scraping

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .