httpc - is a simple zero-conf http 1.1 server to use instead of the python http.server. It distributed as a binary or a source code for running on any platform where other servers cannot be run
To use this program, just run:
# To run http server on 8000 port
httpc 8000
# Without arguments - 8000 port is default
httpcYou can go to the release page and download one of the .deb packages
Also, this package is available on AUR
And, of course, you can build it from source
If you are able to use the make command on you target machine,
you can just run in the root of this repo:
make clean installThis command will install a program to your machine. You can also configure the path of the program to install to:
make clean install BINPREFIX=YOUR_PATHIf you can't use make, just run this commands in the root of this repo:
gcc src/*.c -o httpc
cp httpc YOUR_PATHBy default, linux doesn't allow you listen port which is less than 1024 without root privileges. So you can't just run:
httpc 80
# You need to use sudo
sudo httpc 80But if you run this command, it allows you to listen 80 port without sudo:
sudo setcap 'cap_net_bind_service=+ep' PATH_TO_BINARY
# Example
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/httpc