A tiny but highly configurable HTTP/1.1 server implementation, made for learning purpose.
This web server has been developed for learning purpose, and is not, by ANY mean, intended for real world usage.
It doesn't even completely conform to the HTTP/1.1 specification, and there is room for a lot of improvements.
For more information about our configuration format and our API, feel free to check the wiki. While some parts are outdated or incomplete, it still is very relevant and worth reading.
A simple make command should make the webserv executable. This executable is the server itself and can then be started by providing it a configuration file like so:
./webserv ./asset/config/simple.conf
By default, when a HTTP error is leveraged by the server, simple HTML that indicates the error status and a short description of the status is sent to the user agent. For security sake, no specific information about why the error happened is delivered to the client.
However, by passing to webserv the ERROR_HINT environment variable, the response will contain some insights about why the error actually happened. This may be useful for quick and easy troubleshooting (although error logs are generally a much better option).
Starting the server as showed below should do the trick.
ERROR_HINT=1 ./webserv my_config