Setting up the Darkhttpd web server on Edubudgie 22
Welcome back to another tutorial from our Linux tutorial series.
We are taking a break from Alpine Linux and exploring a new topic.
This time we will deploy the Darkhttpd web server on an Edubudgie 22 virtual machine.
Darkhttpd is a lightweight, single-threaded web server written in C. It was created by Emil Mikulic and released in 2003. The project aimed to provide a simple, efficient, and secure web server solution for serving static content.
The server is designed to be minimalist, with a focus on performance and resource efficiency. It has a small memory footprint and low CPU usage, making it suitable for embedded systems, personal servers, or any situation where resources are limited.
Darkhttpd gained popularity among users who needed a lightweight web server for serving static files without the complexity and overhead of more feature-rich servers like Apache or Nginx. Its simplicity and ease of use made it a popular choice for various projects and applications.
Over the years, darkhttpd has been maintained and updated by Emil Mikulic, with occasional contributions from the open-source community. Its stable performance and reliability have made it a trusted option for those seeking a lightweight web server solution.
We need to complete several steps to get it working correctly.
1. Boot the system -- System Ready.
2. Boot the system -- Logged In.
3. Start a new SSH session.
ssh -v -p 2222 [email protected]
4. Start a new SSH session.
5. Start a new SSH session.
6. Check for updates.
apt-get update
7. Check for updates.
8. Running the command "htop".
htop
9. Install the packages necessary for the Darkhttpd Web Server.
apt install darkhttpd
This did not work as that particular package is missing from the repositories.
We then proceed to download the latest version from the official GitHub.
wget https://github.com/emikulic/darkhttpd/archive/refs/tags/v1.16.tar.gz
10. Install the packages necessary for the Darkhttpd Web Server.
领英推荐
We need to extract the archive.
tar -xzvf v1.16.tar.gz
11. Install the packages necessary for the Darkhttpd Web Server.
We need to change the directory to the new darkhttpd directory.
cd darkhttpd-1.16
12. Install the packages necessary for the Darkhttpd Web Server.
We need to compile the Darkhttpd Web Server binary.
make
13. Install the packages necessary for the Darkhttpd Web Server.
We need to copy the newly compiled Darkhttpd Web Server binary to the correct bin directory.
cp darkhttpd /usr/local/bin
14. Install the packages necessary for the Darkhttpd Web Server.
We need to execute/launch the newly compiled binary.
darkhttpd --version
15. Running the Darkhttpd Web Server on Edubudgie 22
We need to properly execute with the correct arguments to show where our index.html file is located on our system.
./darkhttpd /var/www/htdocs
16. Running the Darkhttpd Web Server on Edubudgie 22
We can use localhost.
https://localhost
17. Running the Darkhttpd Web Server on Edubudgie 22
18. Now we can safely and gracefully shut down our system by running the command "poweroff".
poweroff
That was fun! See you next time. #linux
"Wenn du etwas tun willst, findest du L?sungen, wenn nicht, findest du Gründen." ( von mir ) "If you want to do something, you'll find solutions; if not, you'll find excuses." ( my own )
8 个月salutare, poti sa imi spui exact la ce ne-ar folosi acest Darkhttpd?