Simple HTTP server.
You can use cmake tool to build.
mkdir build
cd build
cmake ..
makeI use custom makefile. Just make:
make -f Makefile.msysThe folder build will be created with server application.
Server uses simple configuration file config.ini:
# domain name, default value = localhost
host=localhost
# port number, default value = 80
port=8080
# site directory, default value = ./html
root_dir=./htmlThe project contains default site folder html, you can customize files in it. For running do:
make -f Makefile.msys startAnd access http://localhost:8080 from your browser.
You also can try to use docker version. Just build image and run container:
docker build -t httpserver .
docker run -d -p 8080:8080 --name httpserver httpserverThe site is placed int the /html directory by default, you can mount your own site directory:
docker run -d -p 8080:8080 -v /path/to/your/site:/html --name httpserver httpserverDocker Compose is also supported:
docker-compose up -d- config file
- check config
- start arguments
- definitions to config file
- proxy
- logging
- prevent Directory Traversal attacks
- validate HTTP request size
- buffer overflows prevention
- HTTP headers validation
- multi-threading
- fix socket leaks
- graceful shutdown