TracNav menu
-
Core Features
- Configuration File Syntax
- Configuration Options
- Change Root
- Performance
- PerformanceFastCGI
- SSL
- Traffic Shaping
- Using SMP
-
Modules
- mod_accesslog
- mod_access
- mod_alias
- mod_auth
- mod_cache
- mod_cgi
- mod_cml
- mod_compress
- mod_deflate
- mod_dirlisting
- mod_evasive
- mod_evhost
- mod_expire
- mod_extforward
- mod_fastcgi
- mod_flv_streaming
- mod_geoip
- mod_magnet
- mod_mem_cache
- mod_mysql_vhost
- mod_proxy
- mod_redirect
- mod_rewrite
- mod_rrdtool
- mod_scgi
- mod_secdownload
- mod_setenv
- mod_simple_vhost
- mod_ssi
- mod_status
- mod_trigger_b4_dl
- mod_userdir
- mod_useronline
- mod_usertrack
- mod_webdav
-
Modules (1.5 only)
- mod_proxy_core
- mod_sql_vhost_core
- mod_uploadprogress
- mod_deflate
-
Internals
- FastCGI state-engine
- Plugin interface
- HTTP state-engine
-
Additional
- User written Modules
Conditional Request Headers
Module: mod_setenv
Description
The setenv module allows influencing the environment external applications are spawned in and the response headers the server sends to the clients.
Automatic Decompression
If you have alot text-files compressed with gzip on disk and want that the browser is decompressing them on retrival you can use setenv to inject the Content-Encoding header:
$HTTP["url"] =~ "(README|ChangeLog|\.txt)\.gz$" {
setenv.add-response-header = ( "Content-Encoding" => "gzip")
mimetype.assign = ("" => "text/plain" )
}
Options
- setenv.add-environment
adds a value to the process environment that is passed to the external applications
setenv.add-environment = ( "TRAC_ENV" => "lighttpd", "RAILS_ENV" => "production" )
- setenv.add-response-header
adds a header to the HTTP response sent to the client
setenv.add-response-header = ( "Content-Encoding" => "gzip" )
- setenv.add-request-header
adds a header to the HTTP request that was received from the client
setenv.add-request-header = ( "X-Proxy" => server.name )

