Skip to content

hamidthri/webserv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Webserv

Description

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

Features

  • GET requests
  • POST requests
  • DELETE requests
  • Multiple clients
  • Static files
  • File upload
  • Non-blocking I/O
  • CGI scripts
  • Error handling

Installation

  1. Clone the repository
git clone
  1. Change directory to the project
cd webserv
  1. Run the make command
make

Usage

  1. Create a and edit a configuration file
touch config.conf && nano config.conf
  1. 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;
    }
}
  1. Run the server
./webserv config.conf
  1. Open a web browser and go to http://localhost:8080

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published