{"id":15047305,"url":"https://github.com/moshegroot/webserver21","last_synced_at":"2026-04-09T10:49:00.507Z","repository":{"id":43278667,"uuid":"436307706","full_name":"MosheGroot/webserver21","owner":"MosheGroot","description":"Implementation of webserver like nginx","archived":false,"fork":false,"pushed_at":"2022-03-28T09:55:08.000Z","size":772,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T15:31:31.946Z","etag":null,"topics":["cpp","cpp98","http","sockets","tcp","webserver"],"latest_commit_sha":null,"homepage":"","language":"C++","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/MosheGroot.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}},"created_at":"2021-12-08T16:01:43.000Z","updated_at":"2023-08-06T22:21:11.000Z","dependencies_parsed_at":"2022-09-07T14:40:22.244Z","dependency_job_id":null,"html_url":"https://github.com/MosheGroot/webserver21","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheGroot%2Fwebserver21","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheGroot%2Fwebserver21/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheGroot%2Fwebserver21/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MosheGroot%2Fwebserver21/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MosheGroot","download_url":"https://codeload.github.com/MosheGroot/webserver21/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243473889,"owners_count":20296653,"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":["cpp","cpp98","http","sockets","tcp","webserver"],"created_at":"2024-09-24T20:56:19.242Z","updated_at":"2025-12-29T10:44:37.659Z","avatar_url":"https://github.com/MosheGroot.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webserv project\n\n\n\n## Goal:\n\nWrite own implementation of web server like nginx one with next capabilities:\n  * custom configs\n  * multiple servers handling at one or different `ip:port` pairs\n  * multiple client-server connections\n  * simple CGI\n  * multiple routes in server, error pages, redirects and max client body size paramets\n  * `GET`, `POST` and `DELETE` methods with `HTTP/1.1` version of requests\n\nLanguage: `C++98`\n\n\n\n\n## Result\n\n* Structured code with object-oriented principles splitted by 5 parts:\n  + Config\n  + Core\n  + Http\n  + CGI\n  + Utils\n* Custom configs with multiple servers with next parameters:\n  + ip and port\n  + server_name\n  + max client body size \n  + locations:\n    + uri\n    + root\n    + index\n    + autoindex\n    + allowed methods\n    + cgi\n    + redirect\n* Multiple servers at one or different ip:port socket\n* Multiplexing with low-level `select` function for non-blocking sockets problem-solving\n* `GET`, `POST` and `DELETE` methods\n* Autoindex pages\n* Execution of simple CGI bash scripts or binaries\n* Simple thread-unsafety logger to console and file\n\n### Runtime\n\nhttps://user-images.githubusercontent.com/44144647/157638273-f731b1a1-6515-4f27-a8d6-536540f81058.mp4\n\n\n\n\n## Contributors\n\n\n| \u003cimg src=\"https://avatars.githubusercontent.com/u/44144647?v=4\" width=\"25px\"\u003e [PP189B][PP189B_profile]  | \u003cimg src=\"https://avatars.githubusercontent.com/u/53272893?v=4\" width=\"25px\"\u003e [Uliana-So][Uliana-So_profile]  | \u003cimg src=\"https://avatars.githubusercontent.com/u/77484081?v=4\" width=\"25px\"\u003e [AliceFromWardenfell][AliceFromWardenfell_profile] |\n|---------------------------------------|------------------------------------------|---------------------------------------------------------------|\n| HTTP + requests processing + default pages    | Config + CGI + [Kvast website](https://github.com/Uliana-S/kvast_htmlacademy)     | Client-server connections, multiplexing and etc.              |\n\n## Testing\n\n### Current configuration\n\n* [Kvast website](https://github.com/Uliana-S/kvast_htmlacademy) at `http://kvast.webserv.local`\n![image](https://user-images.githubusercontent.com/44144647/157631309-1955e75e-6820-4dcc-b2c4-3b0b54b4a013.png)\n\n* Test website at `webserv.local:8888`\n![image](https://user-images.githubusercontent.com/44144647/157630839-35b3fb01-0b3f-4a89-9284-80afc16c1333.png)\n\n* Default website at `default.webserv.local:8888`\n![image](https://user-images.githubusercontent.com/44144647/157630648-2fc203ae-2b3e-4b3f-a52a-274df46ec3e4.png)\n\n###### (P.S. you need to configure domains in `hosts` file of your system for testing)\n\n\n### Configurating\n\nUse this template for adding new server:\n```\nserver\n    ip   \u003c...\u003e\n    port \u003c...\u003e\n    server_name   \u003cname1\u003e \u003cname2\u003e \u003cname3\u003e\n    max_body_size \u003cnumber in bytes\u003e\n    location \u003curi\u003e\n        root      \u003c...\u003e\n        index     \u003c...\u003e\n        cgi       \u003c...\u003e\n        redirect  \u003c...\u003e\n        method    \u003cm1\u003e \u003cm2\u003e \u003cm3\u003e\n        autoindex \u003con/off\u003e\n    location \u003curi\u003e\n        ...\n```\n\n### Build and run\n\n```\nmake\n\n./webserver [path_to_config]\n```\n\n\n[PP189B_profile]: https://github.com/PP189B\n[Uliana-So_profile]: https://github.com/Uliana-So\n[AliceFromWardenfell_profile]: https://github.com/AliceFromWardenfell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoshegroot%2Fwebserver21","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoshegroot%2Fwebserver21","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoshegroot%2Fwebserver21/lists"}