Project done in collaboration with:
Rodrigo Ramos
João Arsénio
42_Webserv is a web server written from scratch in C++ (C++98), capable of handling multiple clients simultaneously.
Disclaimer: Only tested with Firefox
- NGINX-like configuration file
- Handling of the GET, POST and DELETE HTTP request methods
- File upload
- Python CGI support
1- Installing webserv dependencies:
sudo apt-get install c++ make
2- Clone this repository:
git clone https://github.com/Kuninoto/42_webserv webserv
3- Navigate to the project's folder, compile and wipe the artefact object files:
cd webserv && make && make clean
3- Run webserv
./webserv <config_file>
or
./webserv
which is the same as:
./webserv config/default.conf
4- Open Firefox and search for localhost:8080
make
or make all
- compiles webserv
make clean
- wipes all object files
make fclean
- deletes webserv and all object files
make re
- fclean
+ all
What is HTTP?
Definition
HTTP Crash Course & Exploration
Understanding HTTP
HTTP Request Methods:
Overview
GET
POST
DELETE
What is a Web Server?
Definition
Concepts and Examples
How to build a simple HTTP server from scratch
Sockets
Definition
What exactly is a Socket?
I/O Multiplexing
Socket programming with select(), poll() and epoll() in Linux
poll() man page
NGINX
Definition
Understanding NGINX configuration file
CGI
Common Gateway Interface (CGI)
Python CGI Programming
General
Blocking vs. Non-blocking I/O
URL vs. URI
Made by Nuno Carvalho (Kuninoto) | [email protected]