Skip to content

josselinonduty/simple-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-http

A simple HTTP server implementation in C

Caution

Make sure to have libmagic installed on your system before building the project.

Usage

simple-http [-c <config file>] [-d <directory>] [-h <host>] [-p <port>] [-t <timeout]

By default, the server listens on host 0.0.0.0 port 80 and serves files from ./www

If no arguments are provided, the server will try to load /usr/local/etc/simple-http.conf or /etc/simple-http.conf if the former does not exist.

Options

  • -c <config>: Path to configuration file (will ignore other options)
  • -d <directory>: Directory to serve files from (default: ./www)
  • -h <host>: Host to listen on (default: 0.0.0.0)
  • -p <port>: Port to listen on (default: 80)
  • -t <timeout>: Timeout in milliseconds (default: 0, no timeout)

Building

First, install the required dependencies:

# Debian/Ubuntu
sudo apt-get install libmagic-dev

On other systems, you may need to install libmagic-devel or file-devel instead. Please refer to your package manager's documentation.

Then, build the project:

make

License

This project is licensed under the MIT License. See LICENCE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published