Catalog / Lighttpd Web Server Cheatsheet
Lighttpd Web Server Cheatsheet
A quick reference guide for Lighttpd, covering installation, configuration, common commands, and modules.
Installation and Basic Commands
Installation
Debian/Ubuntu:
CentOS/RHEL:
|
Verify Installation:
|
Service Management
Start |
|
Stop |
|
Restart |
|
Status |
|
Enable (Start on boot) |
|
Disable (Don’t start on boot) |
|
Configuration File
Main configuration file: |
Modules configuration directory: |
Basic Configuration
Server Configuration
|
|
|
Port and Interface Configuration
Bind to a specific IP and Port |
|
Listen on IPv6 |
|
Virtual Hosts
Create directories for each virtual host. For example, Create a virtual host configuration file (e.g.,
Enable the virtual host:
Restart Lighttpd. |
Modules
Enabling/Disabling Modules
Use Enable a module:
Disable a module:
This creates/removes symbolic links in |
Common Modules
|
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). |
PHP Configuration (mod_fastcgi)
Enable
Configure PHP in
Ensure |
Advanced Configuration
HTTPS Configuration (mod_openssl)
Restart Lighttpd. |
URL Rewriting (mod_rewrite)
Enable
Rewrite rules in
|
Access Control (mod_access)
Allow only specific IPs |
Deny all other IPs by default. |
Deny specific IPs |
|