https://github.com/youpong/chttpd
A single threaded multi process HTTP 1.1 Server implemented in C records apache-like access logs.
https://github.com/youpong/chttpd
c web-server
Last synced: about 1 year ago
JSON representation
A single threaded multi process HTTP 1.1 Server implemented in C records apache-like access logs.
- Host: GitHub
- URL: https://github.com/youpong/chttpd
- Owner: youpong
- License: mit
- Created: 2020-08-19T06:04:57.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-20T13:33:39.000Z (almost 4 years ago)
- Last Synced: 2025-02-16T14:55:07.807Z (over 1 year ago)
- Topics: c, web-server
- Language: C
- Homepage:
- Size: 1010 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# Web Server
A multi-process HTTP 1.1 Server implemented in C,
records apache-like access logs.
This software is released under [MIT license](./LICENSE).
## Prerequisite
* clang
* clangd
* make
* bear
* doxygen
## RUNNING
The web server runs on Ubuntu-20.04 x86_64.
To start the server, run the following command:
```bash
$ ./httpd [-r DOCUMENT_ROOT] [-l ACCESS_LOG] [-p PORT]
```
To stop the server, just press Ctrl+C on the command line.
options:
- `-r DOCUMENT_ROOT` : set document root (default: www)
- `-l ACCESS_LOG` : set access log (default: access.log)
- `-p PORT` : listen port PORT (default: 8088)
To show the version, run the following command:
```bash
$ ./httpd -v
```
## BUILD
To build, run the following command:
```bash
$ make -j${nproc} all
```
## TEST
To test, run the following command:
```bash
$ make check
```
## API Docs
To generate api docs, run the following command:
```bash
$ make docs
```
## Reference
* https://www.rfc-editor.org/rfc/rfc7230.html Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing
* https://httpd.apache.org/docs/2.4/en/logs.html Apache HTTP Server V2.4 Log Files