Code Monkey home page Code Monkey logo

webserv's Introduction

Webserv

This project is about writing a HTTP server, similar to Nginx, Apache or Lighttpd.

What is Webserv?

Webserv is a group project at 42 which requires us to build a HTTP server using I/O Multiplexing built on top of an event loop.

In the mandatory part, we start the server by reading a configuration file loosely based on Nginx configuration options, allowing customization of features such as, hostname(ip/port), servername, index file, directory listing, URL redirect, location(vhost path), among other settings. It is forbidden to use fork to create new non-CGI processes or spawn threads (threads are not available in C++98).

Using I/O Multiplexing the Kernel informs the server of any incoming and outgoing data availability in monitored file descriptors; we can use select, poll, epoll or kqueue. Prior to reading or writing in a socket it is strictly required that the server goews through poll() or equivalent, ensuring high server availability, respecting the event loop.

HTTP requests are read, parsed, processed and sent to a CGI, which can be customized in the configuration file and finally a HTTP response is returned to the client with headers, body and correct HTTP status code.

For the bonus we have to support cookies, session management and handle multiple CGI.

Availability

alt text

Badge

Skills

  • Network & system administration
  • Unix
  • Rigor
  • Object-oriented programming

My grade

Getting started

Follow the steps below

# Clone the project and access the folder
git clone https://github.com/VLN37/webserv && cd webserv/

# Run make so you can build the program and install dependencies
# the dep directive asks for sudo permissions in order to install php-cgi
make && make dep

# Run the application with the provided configuration file
./webserv default.conf

# Access the default website using the URL below
http://localhost:3490

# Clean output objects with
make fclean

# Well done!

Updating

The project is regularly updated with bug fixes and code optimization.

๐Ÿ“ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.


Made by: Joรฃo Rodriguez ๐Ÿ‘‹ See my github
Paulo Santana ๐Ÿ‘‹ See my linkedin
Welton Leite ๐Ÿ‘‹ See my linkedin

webserv's People

Contributors

wwwwelton avatar vln37 avatar paulo-santana avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.