A minimal HTTP Web server written in Rust.
- Static File Serving: Serves files from the
www/
directory. - Directory Listing: Generates a listing if no
index.html
is found. - HTTP Methods: Supports GET and HEAD.
- Admin Interface: Accessible on the admin port with basic authentication (default:
admin
/adminpass
). - Thread-Safe Logging: Logs requests, errors, and periodic server statistics.
rust-http-web-server/
├── Cargo.toml
├── config.json
├── README.md
├── www
| └── index.html
└── src/
├── admin.rs
├── config.rs
├── handler.rs
├── logger.rs
├── server.rs
├── utils.rs
└── main.rs
-
Clone the repository:
git clone https://github.com/hmdfrds/rust-http-web-server.git cd rust-http-web-server
-
Build the project:
cargo build --release
-
Run the server:
cargo run --release
Edit config.json
to adjust host, port, document root, and logging parameters.
MIT License. See License.