Debian/Ubuntu:
sudo apt update
sudo apt install lighttpd
CentOS/RHEL:
sudo yum install lighttpd
A quick reference guide for Lighttpd, covering installation, configuration, common commands, and modules.
Debian/Ubuntu:
CentOS/RHEL:
|
Verify Installation:
|
Start |
|
Stop |
|
Restart |
|
Status |
|
Enable (Start on boot) |
|
Disable (Don’t start on boot) |
|
Main configuration file: |
Modules configuration directory: |
|
|
|
Bind to a specific IP and Port |
|
Listen on IPv6 |
|
Create directories for each virtual host. For example, Create a virtual host configuration file (e.g.,
Enable the virtual host:
Restart Lighttpd. |
Use Enable a module:
Disable a module:
This creates/removes symbolic links in |
|
Provides access control based on IP addresses. |
|
Allows defining aliases for directories. |
|
Enables HTTP compression (gzip/deflate). |
|
Handles HTTP redirects. |
|
Provides URL rewriting capabilities. |
|
For FastCGI support (e.g., PHP). |
Enable
Configure PHP in
Ensure |
Restart Lighttpd. |
Enable
Rewrite rules in
|
Allow only specific IPs |
Deny all other IPs by default. |
Deny specific IPs |
|