#Webserv
This project is a simple web server that can handle multiple clients at the same time. It is able to serve static files and dynamic files. The server is able to handle GET, POST, and DELETE requests
- GET requests
- POST requests
- DELETE requests
- Multiple clients
- Static files
- File upload
- Non-blocking I/O
- CGI scripts
- Error handling
- Clone the repository
git clone
- Change directory to the project
cd webserv
- Run the make command
make
- Create a and edit a configuration file
touch config.conf && nano config.conf
- Add the following configuration
server {
listen 8080;
server_name localhost;
location / {
root /path/to/your/static/files;
}
location /upload {
root /path/to/your/uploaded/files;
upload on;
}
location /cgi-bin {
cgi on;
}
}
- Run the server
./webserv config.conf
- Open a web browser and go to
http://localhost:8080