Welcome to our Webserv project for 42! This README provides an overview of our HTTP server implementation, configuration details, and how to get started using our server.
An HTTP server is software designed to accept requests from clients and send them responses over the internet or a network. Typically, it serves web pages to users in response to requests which include methods like GET, POST, DELETE, etc.
Our project, Webserv, is designed to simulate the behavior of real HTTP servers but on a smaller scale. It can handle multiple server configurations simultaneously up to a limit of 1024 servers due to our choice of using the select() function. The key features of our implementation are:
/cgi./register and /login.We are proud to announce that our Webserv project received the highest possible mark, scoring a 125% at evaluation. This reflects our commitment to quality, functionality, and adherence to project specifications.
Our server's robustness was tested using the Siege stress tester. After several extended test sessions, Webserv showed excellent reliability, sustaining a 100% success rate across the tests. This demonstrates our server's ability to handle high loads and maintain performance under stress.
Our server configurations are detailed in a separate file. Below is an example configuration for our server:
server:
server_name: example
port: 1234
host: 127.0.0.1
max_body_size: 23854644
root: example_website_path
default_file: index.html
error_page:
403: /error_webpages/403.html
404: /error_webpages/404.html
405: /error_webpages/405.html
413: /error_webpages/413.html
501: /error_webpages/501.html
location:
path: /
methods: GET, POST
redirect: /index.html
# Multiple server blocks can be configured similarlyTo start using Webserv, follow these steps:
git clone https://github.com/rphlr/42-webserv [nameOfFolder]make./webserv [configuration-file-path]make runFor testing purposes with curl, you can use the following commands:
curl -X POST "file=@/Path/to/File" http://localhost:port/cgi?upload=truecurl -X GET http://localhost:port/cgi?file=/path/to/filecurl -X DELETE http://localhost:port/default_webpages?file=FileToDeleteFeel free to contribute to the project by submitting pull requests or by reporting bugs.
Thank you for checking out our Webserv project! We hope it serves as a solid base for learning more about the inner workings of HTTP servers.