Go SimpleHTTPserver is a lightweight and high-performance HTTP server designed for testing purposes. It can serve as an alternative to the well-known Python SimpleHTTPServer, with additional features including a fully customizable TCP server and TLS for secure communication. This tutorial explains how to install Go SimpleHTTPserver on Ubuntu 24.04.
Install Go SimpleHTTPserver
Fetch the latest Go SimpleHTTPserver version tag from its GitHub repository:
SIMPLE_HTTP_SERVER_VERSION=$(curl -s "https://api.github.com/repos/projectdiscovery/simplehttpserver/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
Download archive file using the earlier identified version:
wget -qO simplehttpserver.zip https://github.com/projectdiscovery/simplehttpserver/releases/latest/download/simplehttpserver_${SIMPLE_HTTP_SERVER_VERSION}_linux_amd64.zip
Extract the executable to /usr/local/bin
:
sudo unzip -q simplehttpserver.zip -d /usr/local/bin simplehttpserver
To verify the Go SimpleHTTPserver version, execute the command:
simplehttpserver --version
Delete no longer needed file:
rm -rf simplehttpserver.zip
Testing Go SimpleHTTPserver
For testing purpose, create directory and add an HTML file:
mkdir docs
echo '<!DOCTYPE html><html><head><title>Title</title></head><body>Hello world</body></html>' > docs/index.html
Start the HTTP server:
simplehttpserver -path docs
Open a web browser and go to http://<IP_ADDRESS>:8000
, replacing <IP_ADDRESS>
with your system's IP address. The newly created page will be displayed.
Uninstall Go SimpleHTTPserver
To remove Go SimpleHTTPserver, delete the associated file:
sudo rm -rf /usr/local/bin/simplehttpserver
Leave a Comment
Cancel reply