Skip to content

WebServer is a C++ HTTP server. It handles HTTP requests, serves static files, and manages connections, offering practical experience with networking, HTTP protocols, and server-client architecture.

Notifications You must be signed in to change notification settings

erikgonk/Web_Server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebServer – Build Your Own HTTP Server 🚀

WebServer is a simple HTTP server implemented in C++ as part of the 42 curriculum. It simulates the core functionality of a web server by handling HTTP requests, serving static files, and managing connections. This project provides a deep understanding of networking, HTTP protocols, and server-client architecture.

Features

  • HTTP Request Handling

    • Parses and responds to HTTP GET, POST, DELETE and OPTIONS requests.
  • Static File Serving

    • Serves HTML, CSS, JavaScript, and image files from the server.
  • HTTP Response Codes

    • Handles standard HTTP status codes such as 200 OK, 404 Not Found, 500 Internal Server Error, etc.
  • Basic Authentication

    • Implements simple HTTP authentication to restrict access to certain resources.
  • Request Logging

    • Logs incoming server requests, errors, and actions for troubleshooting and analysis.
  • Multi-threading

    • Allows the server to handle multiple client connections concurrently, improving performance and scalability.
  • Virtual Hosts

    • Supports multiple virtual hosts, allowing the server to host different domains with distinct configurations.
  • CGI Support

    • Executes dynamic content generation through CGI scripts, enabling server-side processing.

Technologies Used

  • 💻 Language: C++
  • 🌐 Protocols: HTTP/1.1, TCP/IP
  • Concurrency: Multi-threading
  • 🧑‍💻 Additional Technologies: CGI, Virtual Hosts, File System Management
  1. Clone the repository:
    git clone https://github.com/erikgonk/Web_Server.git && cd Web_Server
    
  2. Execute it:
    make r
    
  3. Make Request:
    Open another terminal and run:
    firefox "http://localhost:8080"

About

WebServer is a C++ HTTP server. It handles HTTP requests, serves static files, and manages connections, offering practical experience with networking, HTTP protocols, and server-client architecture.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.7%
  • Makefile 5.3%