How To Install lighttpd on Ubuntu 20.04
Introduction
In this tutorial we learn how to install lighttpd
on Ubuntu 20.04.
What is lighttpd
lighttpd is:
lighttpd is a small webserver and fast webserver developed with security in mind and a lot of features. It has support for
- CGI, FastCGI and SSI
- virtual hosts
- URL rewriting
- authentication (plain files, htpasswd, LDAP)
- transparent content compression
- conditional configuration
- HTTP proxying and configuration is straight-forward and easy.
Package: lighttpd Architecture: amd64 Version: 1.4.55-1ubuntu1 Priority: optional Section: universe/web Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian lighttpd maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1240 Provides: httpd, httpd-cgi, lighttpd-mod-access, lighttpd-mod-accesslog, lighttpd-mod-alias, lighttpd-mod-auth, lighttpd-mod-authn-file, lighttpd-mod-cgi, lighttpd-mod-compress, lighttpd-mod-deflate, lighttpd-mod-dirlisting, lighttpd-mod-evasive, lighttpd-mod-evhost, lighttpd-mod-expire, lighttpd-mod-extforward, lighttpd-mod-fastcgi, lighttpd-mod-flv-streaming, lighttpd-mod-indexfile, lighttpd-mod-openssl, lighttpd-mod-proxy, lighttpd-mod-redirect, lighttpd-mod-rewrite, lighttpd-mod-rrdtool, lighttpd-mod-scgi, lighttpd-mod-secdownload, lighttpd-mod-setenv, lighttpd-mod-simple-vhost, lighttpd-mod-sockproxy, lighttpd-mod-ssi, lighttpd-mod-staticfile, lighttpd-mod-status, lighttpd-mod-uploadprogress, lighttpd-mod-userdir, lighttpd-mod-usertrack, lighttpd-mod-vhostdb, lighttpd-mod-wstunnel Depends: libattr1 (>= 1:2.4.44), libbz2-1.0, libc6 (>= 2.28), libgamin0 | libfam0, libpcre3, libssl1.1 (>= 1.1.1), zlib1g (>= 1:1.1.4), mime-support, lsb-base (>= 3.0-6) Recommends: spawn-fcgi, perl:any Suggests: openssl, rrdtool, php-cgi, apache2-utils, lighttpd-doc, lighttpd-mod-authn-gssapi, lighttpd-mod-authn-pam, lighttpd-mod-authn-sasl, lighttpd-mod-cml, lighttpd-mod-geoip, lighttpd-mod-magnet, lighttpd-mod-maxminddb, lighttpd-mod-trigger-b4-dl, lighttpd-mod-vhostdb-dbi, lighttpd-mod-vhostdb-pgsql, lighttpd-mod-webdav, lighttpd-modules-ldap, lighttpd-modules-mysql, ufw Filename: pool/universe/l/lighttpd/lighttpd_1.4.55-1ubuntu1_amd64.deb Size: 323444 MD5sum: 5f732918a9687ceea78311b1f49d7340 SHA1: 8c7b20359d7e50321dceabd41135b43b41d9345f SHA256: 12e9b727dfa95e2ad672568567c4c618d375e65c8dec225840ee88259d06b0cc Homepage: https://www.lighttpd.net/ Description-en: fast webserver with minimal memory footprint lighttpd is a small webserver and fast webserver developed with security in mind and a lot of features. It has support for
- CGI, FastCGI and SSI
- virtual hosts
- URL rewriting
- authentication (plain files, htpasswd, LDAP)
- transparent content compression
- conditional configuration
- HTTP proxying and configuration is straight-forward and easy.
There are three methods to install lighttpd
on Ubuntu 20.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install lighttpd Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install lighttpd
using apt-get
by running the following command:
sudo apt-get -y install lighttpd
Install lighttpd Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install lighttpd
using apt
by running the following command:
sudo apt -y install lighttpd
Install lighttpd Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install lighttpd
using aptitude
by running the following command:
sudo aptitude -y install lighttpd
How To Uninstall lighttpd on Ubuntu 20.04
To uninstall only the lighttpd
package we can use the following command:
sudo apt-get remove lighttpd
Uninstall lighttpd And Its Dependencies
To uninstall lighttpd
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove lighttpd
Remove lighttpd Configurations and Data
To remove lighttpd
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge lighttpd
Remove lighttpd configuration, data, and all of its dependencies
We can use the following command to remove lighttpd
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge lighttpd
References
Summary
In this tutorial we learn how to install lighttpd
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.