The purpose of the project is to create a web server that supports multiple domains, a ban system, and logging capabilities.
Project Utility
This project is useful for serving files over HTTP with support for multiple domains, banning IP addresses, and logging requests.
Project Description
The file server is implemented using Node.js and allows configuration for multiple domains, MIME types, and logging paths. It also supports banning specific IP addresses.
Repository and Installation
Repository: File Server on GitHub
Installation
- Clone the repository:
- Install the dependencies:
Setup
Edit the settings.json
file to configure the server:
Blocking an IP
Add the IP to banlist.json
:
Adding a Domain
- Add the domain to the
hosts
array insettings.json
. - Create a folder named after the domain inside the
homeDir
.
Algorithm
- Server Initialization:
- Request Handling:
- Logging:
- Ban System:
Skills Acquired
- Understanding of HTTP servers with Node.js
- Implementing multi-domain support
- Managing and processing logs
- IP banning mechanisms