How to install an HTTP server on Debian GNU-Hurd

Posted by

On my previous article, about software available on GNU-Hurd, I got a comment about the server use. The person was wondering about how to install Apache and Nginx on GNU-Hurd, so I have decided to make an article about HTTP servers.

Apache

We need to install it and switch to mpm_prefork because of the missing mpm_event module.

apt update
apt install -y apache2
a2dismod mpm_event
a2enmod mpm_prefork
service apache2 restart

We now have an Apache server up and running 🙂

Lighttpd

This one is easier to install, it doesn’t need any manual modification.

apt install -y lighttpd

Nginx

Unfortunately, only an old version is available. The installation will fail the first time, don’t panic, it’s normal. We need to reduce the number of connections by worker and how the master/worker processes are handled.

echo 'Acquire::Check-Valid-Until "false";'> /etc/apt/apt.conf.d/99ignore-valid-until
echo "deb [trusted=yes] https://snapshot.debian.org/archive/debian/20160603T183104Z/ sid main" > /etc/apt/sources.list.d/snapshot.list
apt update
apt install -y nginx-full=1.10.1-1 nginx-common=1.10.1-1 libnginx-mod-http-geoip=1.10.1-1 libnginx-mod-http-image-filter=1.10.1-1 libnginx-mod-http-xslt-filter=1.10.1-1 libnginx-mod-mail=1.10.1-1 libnginx-mod-stream=1.10.1-1 libnginx-mod-http-auth-pam=1.10.1-1
sed -i 's/worker_connections 768;/worker_connections 256;/g' /etc/nginx/nginx.conf
echo 'master_process off;' > /etc/nginx/modules-available/master-process.conf
ln -s  /etc/nginx/modules-available/master-process.conf  /etc/nginx/modules-enabled/master-process.conf
dpkg --configure -a

Conclusion

We are now able to install three different HTTP servers on GNU-Hurd. I recommend you to avoid Nginx since its version is really old. In most of the cases Apache will do the job and you can use lighttpd if you need something lighter.

Leave a Reply

Your email address will not be published. Required fields are marked *