/ngin-xs

Extra small Nginx

Primary LanguageC++

NGIN-XS

NGIN-XS is a simple, lightweight, and fast web server written in C++.


πŸš€ Contributors

πŸ€ sokim | πŸŒ™ heehkim | 🌰 sarchoi

πŸ”— λ…Έμ…˜ 정리


🚧 File Structure

./
β”œβ”€β”€ includes/                 # header files
β”œβ”€β”€ cgi-bin/                  # cgi files
β”œβ”€β”€ conf/                     # configuration files
β”œβ”€β”€ error_pages/              # html files for error page
β”œβ”€β”€ html/		      # web root
β”œβ”€β”€ srcs/		      # source files
β”‚   β”œβ”€β”€ autoindex/            # autoindex
β”‚   └── config/               # configuration file
β”œβ”€β”€ tester                    # client program for test
└── Makefile

❓ Usage

πŸ–οΈ Clone

$ git clone https://github.com/srngch/ngin-xs.git

πŸ–οΈ Compile

$ make

πŸ–οΈ Execute

$ ./webserv [configuration file]

πŸ–οΈ Connect

Type [http://servername:port] in the address bar   
For example [http://localhost:80]

πŸ‘­ Logs

2022-09-21

  • Created the repository
  • Added the README.md file
  • Specified Convention
  • Studied concept of multiplexing and socket programming

2022-09-25

  • Made simple server-client programs: code
  • Learned usage of socket programming functions
    • socket, bind, listen, accept, send, recv, connect
    • htons, htonl, inet_addr
    • header: <sys/socket.h>, <netinet/in.h>, <netinet/ip.h>

2022-09-26

  • Made echo server-client programs: code
  • Made a multiplexing server program: code
  • Learned usage of multiplexing function poll

2022-09-28

  • Fixed bug when multiple clients request connection: code
    • Close socket and initialize fd & revents when POLLHUP event occurs
    • Removed while loop in recv()
  • Fixed bug regarding to EADDRINUSE: code
    • Added close(listen_socket) when error occurs
    • Added setsockopt() to reuse port already in use
  • Specified classes
    • Member variables
    • Member functions

2022-09-29

  • Made a simple server program: Issue, PR

2022-10-01

  • Made a request syntax error exception: Issue, PR
  • Implemented Response class: Issue, PR

2022-10-02

  • Implemented GET method for static files: Issue, PR
  • Implemented request validation: Issue, PR

2022-10-03

  • Implemented calling CGI program with GET: Issue, PR

2022-10-10

  • Implemented autoindex: Issue, PR
  • Implemented POST method: Issue, PR
  • Changed header data type: Issue, PR
  • [WIP] Parse configuration file: Issue

2022-10-12

  • Implemented DELETE method: Issue, PR
  • [WIP] Parse configuration file: Issue

2022-10-13

  • Handled chunked request: Issue, PR
  • Parse configuration file: Issue

2022-10-14

  • Parsed configuration file: Issue, PR
  • [WIP] Implement directory path redirection: Issue

2022-10-15

  • Implemented directory path redirection: Issue, PR
  • [WIP] Get required values from config class: Issue
  • [WIP] Implement python-cgi: Issue

2022-10-17

  • [WIP] Implement python-cgi: Issue
  • [WIP] Get required values from config class: Issue

2022-10-18

  • Implemented python-cgi: Issue, PR
  • Updated function to set response header: Issue, PR
  • [WIP] Get required values from config class: Issue

2022-10-19

  • Implemented CUI client: Issue, PR
  • Added multipart/form-data file upload to python-cgi: Issue, PR
  • Fixed infinite validation when request header is invalid: Issue, PR
  • Fixed CRLF issue when response binary file: Issue, PR
  • [WIP] Get required values from config class: Issue

2022-10-20

  • Implemented handling Connection header: Issue, PR
  • Implemented Limiting client max body size: Issue, PR
  • Refactored exception: Issue, PR
  • Get required values from config class: Issue, PR

2022-10-21

  • Implemented web client: Issue, PR
  • Implemented getting required values from config class: Issue, PR
  • [WIP] Implement running multiple servers: Issue

2022-10-22

  • Implemented running multiple servers: Issue, PR

2022-10-23

  • [WIP] Apply Config class: Issue

2022-10-24

  • Implemented applying Config class: Issue, PR
  • [WIP] Try tester program given by subject: Issue

2022-10-25

  • [WIP] Try tester program given by subject: Issue

2022-10-26

  • [WIP😭] Try tester program given by subject: Issue

2022-10-27