The goal of ft_webserv is to write a simple webserver from scratch by only using tools of the C++98 standart libary and system calls.
It follows the guidelines of the HTML/1.1 RFC, but is not fully compliant to it.
Please note: The project is only tested and intended to be used on UNIX-based operating systems.
clone the repository:
git clone https://github.com/tobbel42/ft_webserv.git &&
cd ft_webserv
build the project:
make
run the webserver with a default configuration:
./webserv
or use a custom configuration file:
./webserv [configFileName]
The webserver listens to all its specified ip:port addresses at the same
time by using kqueue on MACOS and poll on other operating systems for its I/O Multiplexing.
For the default configuration the server listens to 127.0.0.1:8080
and 127.0.0.1:8081
and is rooted at testServerDir
.
A guide on how to write custom configurations can be found here.
The webserver supports:
- The GET, PUT, POST and DELETE methods
- Displaying static websites
- Defining proxies in subdirectories of the server
- Executing CGI scripts based on certain extensions (e.g. .php for php-CGI)
- Listing the contents of directories
first make sure you have docker installed and running on your system
execute
make docker
the server runs on port 8080 by default