{"id":26774486,"url":"https://github.com/jos-felipe/webserv","last_synced_at":"2026-01-08T04:33:59.892Z","repository":{"id":283556961,"uuid":"952149145","full_name":"jos-felipe/webserv","owner":"jos-felipe","description":"This project is here to make you write your own HTTP server. You will be able to test it with a real browser. HTTP is one of the most used protocol on internet. Knowing its arcane will be useful, even if you won't be working on a website.","archived":false,"fork":false,"pushed_at":"2025-03-20T20:45:53.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T22:05:53.245Z","etag":null,"topics":["network","network-and-system-administration","object-oriented-programming","rigor","unix"],"latest_commit_sha":null,"homepage":"https://projects.intra.42.fr/projects/webserv","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jos-felipe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-20T20:11:19.000Z","updated_at":"2025-03-20T20:45:56.000Z","dependencies_parsed_at":"2025-03-21T16:30:30.087Z","dependency_job_id":null,"html_url":"https://github.com/jos-felipe/webserv","commit_stats":null,"previous_names":["jos-felipe/webserv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fwebserv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fwebserv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fwebserv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jos-felipe%2Fwebserv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jos-felipe","download_url":"https://codeload.github.com/jos-felipe/webserv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246126734,"owners_count":20727595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["network","network-and-system-administration","object-oriented-programming","rigor","unix"],"created_at":"2025-03-29T02:16:58.085Z","updated_at":"2026-01-08T04:33:59.886Z","avatar_url":"https://github.com/jos-felipe.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebServ - HTTP Server Implementation\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/language-C++-blue.svg\" alt=\"Language\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/standard-C++98-yellow.svg\" alt=\"C++ Standard\"\u003e\n\u003c/p\u003e\n\n## 📖 Overview\nWebServ is a lightweight HTTP server implementation in C++98. This project is developed to understand the internals of HTTP protocol and web servers, providing hands-on experience with network programming, concurrent connections handling, and HTTP protocol implementation.\n\n\u003e _\"This is when you finally understand why a URL starts with HTTP\"_\n\n## ✨ Features\n- **Fully compliant with HTTP/1.1** protocol specifications\n- **Non-blocking I/O operations** using poll/select/epoll/kqueue\n- **Multiple virtual servers** support with different configurations\n- **Method support**: GET, POST, DELETE\n- **Static file serving** with directory listings\n- **CGI support** for dynamic content\n- **File uploads** handling\n- **Error pages** customization\n- **Redirections** configuration\n- **Client body size limit** configuration\n\n## 🧰 Requirements\n- C++ compiler with C++98 support\n- Make build system\n- UNIX/Linux environment (or MacOS)\n- No external libraries (standard library only)\n\n## 🏗️ Project Structure\n```\nwebserv/\n├── src/\n│   ├── config/        # Configuration parsing\n│   ├── http/          # HTTP protocol handling\n│   ├── socket/        # Socket operations\n│   ├── server/        # Main server implementation\n│   ├── cgi/           # CGI implementation\n│   ├── utils/         # Utility functions and classes\n│   └── main.cpp       # Entry point\n├── include/           # Header files\n├── conf/              # Configuration examples\n├── www/               # Web content examples\n├── tests/             # Test scripts and files\n├── Makefile           # Build script\n└── README.md          # This file\n```\n\n## 🚀 Building and Running\n```bash\n# Clone the repository\ngit clone https://github.com/jos-felipe/webserv.git\ncd webserv\n\n# Build the project\nmake\n\n# Run with default configuration\n./webserv\n\n# Run with custom configuration\n./webserv conf/custom.conf\n```\n\n## ⚙️ Configuration File\nThe server uses a configuration file inspired by NGINX to set up different server instances and routes. Here's a basic example:\n\n```\n# Simple server configuration\nserver {\n    listen 8080;\n    server_name example.com;\n    root /var/www/html;\n    \n    # Default error pages\n    error_page 404 /404.html;\n    error_page 500 502 503 504 /50x.html;\n    \n    # Client body size limit (in bytes)\n    client_max_body_size 10M;\n    \n    # Route configuration\n    location / {\n        # Accepted HTTP methods\n        method GET POST;\n        \n        # Directory listing\n        autoindex on;\n        \n        # Default file for directories\n        index index.html;\n    }\n    \n    # CGI configuration\n    location ~ \\.php$ {\n        method GET POST;\n        cgi_pass /usr/bin/php-cgi;\n    }\n    \n    # Redirection example\n    location /old {\n        return 301 /new;\n    }\n    \n    # Upload configuration\n    location /upload {\n        method POST;\n        upload_store /tmp/uploads;\n    }\n}\n```\n\n## 📋 Development Progress\n- [x] Project setup and repository initialization\n- [x] Configuration file parsing\n- [x] Socket management and non-blocking I/O\n- [x] HTTP request parsing\n- [x] HTTP response generation\n- [x] Static file serving\n- [x] Directory listing\n- [x] Error handling\n- [x] CGI implementation\n- [x] File upload handling\n- [x] Testing and documentation\n\n## 🧪 Testing\nThe server can be tested using:\n- Web browsers (Chrome, Firefox, Safari, etc.)\n- Command-line tools (curl, wget)\n- Testing scripts (Python, Bash)\n- Telnet for raw HTTP request testing\n- External tools like Apache Bench for stress testing\n\n## 👥 Contributors\n- [jos-felipe](https://github.com/jos-felipe)\n- [Adedayo-Sanni](https://github.com/Adedayo-Sanni)\n- [Thiagosdcavalcante](https://github.com/Thiagosdcavalcante)\n\n## 📄 License\nThis project is part of the School 42 curriculum.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjos-felipe%2Fwebserv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjos-felipe%2Fwebserv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjos-felipe%2Fwebserv/lists"}