Skip to content

This project is a HTTP server, own version of Nginx, Apache or Lighttpd.

License

Notifications You must be signed in to change notification settings

wwwwelton/webserv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webserv

This project is about writing a HTTP server, your own version of 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 a event loop.

In the mandatory part, we start the server by reading a configuration file that can be based on Nginx, containing information like hostname(ip/port), servername, index file, directory listing, URL redirect, location(vhost path) and some other settings. It is forbidden to use fork to create new non-CGI processes or spawn threads (threads are not available in C++98).

For the I/O Multiplexing, ie informing the Kernel that we want to be notified if there is a change in a previously specified list of file descriptors; we can use select, poll, epoll or kqueue. All socket reads or writes must pass through poll() or equivalent, ensuring high server availability, respecting the event loop.

HTTP requests are read, parsed, processed and sent to a CGI if configured 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/wwwwelton/webserv && cd webserv/

# Run make so you can build the program and install dependencies
make && make dep

# Run the application with a config 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

About

This project is a HTTP server, own version of Nginx, Apache or Lighttpd.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published