marbenMB / WebServ

An HTTP server ( like Nginx ) in c++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webserv

an HTTP server in c++

At the most basic level, whenever a browser needs a file that is hosted on a web server, the browser requests the file via HTTP. When the request reaches the correct (hardware) web server, the (software) HTTP server accepts the request, finds the requested document, and sends it back to the browser, also through HTTP.

HTTP server usually use TCP for communications.

TCP socket programming

Socket : mechanism to give programs access to the network

  • create a socket with socket()
  • identify the socket with bind()
  • wait for a connection with listen() and accept()
  • send and receive messages with read() and write() (or send() and recv())
  • close the socket with close()

Resources

Guide to Network Programming

Simple server with C++

C++ Web Programming

How to build a simple HTTP server

Understanding Nginx Server and Location Block Selection Algorithms

nginx documentation

Multiplexage

HTTP MDN

Overview :

  • To run the project run make in your terminal in the root of the folder.
  • Then enter the name of your package manager to set the environment for the project.
make

Build

  • Then run the server :
# run with default config
./webser

# run with your config
./webser configfile/path

run

  • Then use your brower : IP:PORT of running server

first_page

Team Members :

team

About

An HTTP server ( like Nginx ) in c++.


Languages

Language:C++ 68.4%Language:HTML 16.1%Language:CSS 10.4%Language:Shell 1.4%Language:Go 1.2%Language:Makefile 1.2%Language:Python 0.9%Language:JavaScript 0.3%