Porter is a simple web server written in C. This web server runs on GNU/Linux.
This web server is far from complete. The plan is to modularize GoHttp, write tests, add features and eventually produce a small library that can be included in future projects.
It currently supports GET so you can use it to receive any files that correspond with the mime types in mime.types.
- gcc
- Make
- c99
- Docker
- Download the source
- Compile the source using
make
- Run from root directory with
./main
- Run the tests with
make check
You can start the web server with the following command line arguments:
-p port number
-d run as daemon
-l log file
You can open httpd.conf and change the following:
wwwroot /home/frw/public_html/
port 7000
This project was originally forked from GoHttp, a really great resource. I also spent a lot of time reading Beej's Guide to Network Programming.
From fekberg: "If it weren't for the course in Advance UNIX Programming that I took at Blekinge Institute of Technology I would never have written this. It all originated from a question on StackOverflow from 2009 where I asked for information on how to write a simple web server in C."