Files
http-server/readme.md
2019-06-19 20:31:25 +02:00

19 lines
1.2 KiB
Markdown

# http-server
http-server is a simple http server that does not conform to any standards. It's main purpose is for experimentation: both playing around with HTTP quirks and simple socket programming under Linux.
## Requirements
I have tested building the program with the following compilers:
- gcc 8.3.0
- gcc 9.1.0
- clang 8.0.0
The build process requires `make`. Testing (`make tests`) uses `curl` of which I used `curl 7.65.1`.
## Building
Run `make all`.
## Running
Run `make check` or change directory to the `bin/` directory and run the server binary yourself (most likely `./server.out`). You probably want to create a subfolder in `bin/` to serve as root for the webserver (i.e. a directory it will serve static files from). By default it looks for `./www/` in its working directory. The default behaviour of the webserver is to serve `/index.html` when it gets a request ending with `/`, e.g. `/mydirectory/` will have the webserver search for the file `./www/mydirectory/index.html` (by default this would translate to `bin/www/mydirectory/index.html` as seen from the repository root).
The webserver currently is not configurable, despite there being a `bin/server.cfg` file. This file is simply ignored for now.