{"id":20515356,"url":"https://github.com/guilt/phttpd","last_synced_at":"2025-03-05T23:20:46.372Z","repository":{"id":147695212,"uuid":"173502179","full_name":"guilt/phttpd","owner":"guilt","description":"😺 HTTPD","archived":false,"fork":false,"pushed_at":"2024-11-28T23:33:44.000Z","size":319,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T10:13:51.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guilt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-03-02T21:44:52.000Z","updated_at":"2024-11-28T23:33:44.000Z","dependencies_parsed_at":"2024-03-22T22:31:28.674Z","dependency_job_id":"e60fb43d-7cc1-46e2-83da-6f4c2c157013","html_url":"https://github.com/guilt/phttpd","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/guilt%2Fphttpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guilt%2Fphttpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guilt%2Fphttpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guilt%2Fphttpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guilt","download_url":"https://codeload.github.com/guilt/phttpd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242118499,"owners_count":20074588,"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":[],"created_at":"2024-11-15T21:21:06.745Z","updated_at":"2025-03-05T23:20:46.340Z","avatar_url":"https://github.com/guilt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"😺 HTTPD\n---------\n\n😺 HTTPD is a lightweight, classic web server which can be used\nto serve static web sites. It supports a minimum subset of the \nHTTP 1.0 and 1.1 protocols. It features keep-alives, IPv6 and\ndaemonization support. It is reasonably easy to use.\n\nIt was written in a few hours over a weekend, when the author\nwas betting that he could write one in a small amount of time.\nIt was meant to be a tiny version of an elaborate web server\nlike Tomcat. Hence the name. 😉\n\nHow to Build\n------------\n\nThe distribution is very compact, and building the distribution is\nvery easy.\n\n```shell\n$ make -C netlibmini\n$ make -C phttpd\n```\n\nThat's it. Now to launch the server, execute `phttpd_s`. If you are\nrunning on a privileged port, you will need to run as root. With\ndefault build settings, it runs on port **8080**. \n\n```shell\n$ ./phttpd/phttpd_s\n```\n\nAnd then you should be able to test it like so:\n\n```shell\n$ curl --http1.0 localhost:8080\n```\n\nUnset `SERV_PORT` in `Makefile` to make it build it to run on port **80**.\n\nA sample `rc.phttpd` is provided in `etc/` for those who wish to run the server\nat init / startup.\n\nPHTTPD - Simple\n---------------\n\nThe `phttpd_s` is the simplest server to use. When run from a \nparticular directory, it serves files from the `htdocs/` folder. \nIf a file is not specified in the URI, it uses `index.html`. It\ndoes not do directory browsing, which is a feature, preventing\npeople from trespassing into sensitive content.\n\nFor example, if you are running a site called spam.com, a directory\nstructure would be like this:\n\n```\nhtdocs/\n       index.html                   Homepage\n       images/                      Directory, not browsable\n               logo.gif             Site logo\n       users/                       Directory, not browsable\n               index.html           Information about people\n               bob/                 Bob's directory\n                      index.html    Homepage\n               alice/               Alice's directory\n                      index.html    Homepage\n                      favicon.ico   Alice's site icon\n```\n\nPHTTPD - Vhost\n--------------\n\nThe `phttpd_v` server is a little more complex. It supports virtual\nhosting, a way by which multiple web sites can run from the same\ncomputer. When run from a particular directory, it serves files\nfrom the `vhosts/\u003chostname.com\u003e` folder. The rules for directory\nbrowsing and default URI apply, as well. \n\nFor all the IP Addresses/Hostnames that you want your server\naccessed as, You are required to create directories/symbolic links\nas well as maintain their content as well. \n\nFor example, when hosting two sites called pam.com and sam.com, \nyou will probably be using a structure like this:\n\n```\nvhosts/\n        pam.com/                     \n                index.html          Homepage of pam.com \n        sam.com/                     \n                index.html          Homepage of sam.com \n                favicon.ico         sam.com's site icon\n```\n\nAdditional Code\n---------------\n\nMany thanks to the following authors and projects:\n\n* Toni Ronkko - [Dirent for Visual C++](https://github.com/tronkko/dirent)\n\nLimitations\n-----------\n\nThe web servers are given away free, but with an accompanying\n[DISCLAIMER](DISCLAIMER.md). That is to merely protect the author from being sued\n(or exploited) but not an excuse to write lousy code. Any \nsuggestions/bug reports/fixes would be most welcome.\n\nFeedback\n--------\n\n* Author: Karthik Kumar Viswanathan\n* Web   : http://karthikkumar.org\n* Email : karthikkumar@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilt%2Fphttpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguilt%2Fphttpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguilt%2Fphttpd/lists"}