Created
August 31, 2010 19:14
-
-
Save raphaelm/559552 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debian lighttpd configuration file | |
# | |
############ Options you really have to take care of #################### | |
## modules to load | |
# mod_access, mod_accesslog and mod_alias are loaded by default | |
# all other module should only be loaded if neccesary | |
# - saves some time | |
# - saves memory | |
server.modules = ( | |
"mod_access", | |
"mod_alias", | |
"mod_accesslog", | |
"mod_compress", | |
"mod_rewrite", | |
"mod_fastcgi", | |
"mod_auth", | |
"mod_redirect", | |
"mod_evasive", | |
"mod_cgi", | |
"mod_status", | |
"mod_setenv" | |
) | |
evasive.max-conns-per-ip = 7 | |
## a static document-root, for virtual-hosting take look at the | |
## server.virtual-* options | |
server.document-root = "/var/www/fail" | |
## where to upload files to, purged daily. | |
server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) | |
## where to send error-messages to | |
server.errorlog = "/var/log/http/error.log" | |
## files to check for if .../ is requested | |
index-file.names = ( "index.php", "index.html", "index.py", | |
"index.htm", "default.htm", | |
"index.lighttpd.html" ) | |
# natürlich wirspeichernnicht.de-kompatibel | |
accesslog.format = "%l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" | |
url.access-deny = ( "~", ".inc", ".htpasswd", ".htaccess" ) | |
static-file.exclude-extensions = (".py", ".php", ".pl", ".fcgi" ) | |
## Use ipv6 only if available. | |
include_shell "/usr/share/lighttpd/use-ipv6.pl" | |
## bind to port (default: 80) | |
#server.port = 81 | |
include "port.conf" | |
## virtual directory listings | |
dir-listing.encoding = "utf-8" | |
#server.dir-listing = "enable" | |
## change uid to <uid> (default: don't care) | |
server.username = "www-data" | |
## change uid to <uid> (default: don't care) | |
server.groupname = "www-data" | |
#### compress module | |
compress.cache-dir = "/var/cache/lighttpd/compress/" | |
compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css") | |
#### external configuration files | |
## mimetype mapping | |
include_shell "/usr/share/lighttpd/create-mime.assign.pl" | |
## load enabled configuration files, | |
## read /etc/lighttpd/conf-available/README first | |
include_shell "/usr/share/lighttpd/include-conf-enabled.pl" | |
#### handle Debian Policy Manual, Section 11.5. urls | |
## by default allow them only from localhost | |
## (This must come last due to #445459) | |
## Note: =~ "127.0.0.1" works with ipv6 enabled, whereas == "127.0.0.1" doesn't | |
$HTTP["remoteip"] =~ "127.0.0.1" { | |
alias.url += ( | |
"/doc/" => "/usr/share/doc/", | |
"/images/" => "/usr/share/images/" | |
) | |
$HTTP["url"] =~ "^/doc/|^/images/" { | |
dir-listing.activate = "enable" | |
} | |
status.status-url = "/server-status" | |
} | |
fastcgi.server = ( ".php" => (( | |
"bin-path" => "/usr/bin/php5-cgi", | |
"socket" => "/tmp/php.socket" | |
))) | |
$SERVER["socket"] == ":443" { | |
ssl.engine = "enable" | |
ssl.pemfile = "/etc/lighttpd/ssl/gf/gf.pem" | |
ssl.ca-file = "/etc/lighttpd/ssl/gf/gf.crt" | |
} | |
server.max-keep-alive-requests = 0 | |
# alle vhosts nach diesem schema | |
$HTTP["host"] == "www.geeksfactory.de" { | |
server.name = "www.geeksfactory.de" | |
server.document-root = "/var/www/www.geeksfactory.de/html" | |
accesslog.filename = "/var/log/http/www.geeksfactory.de_access.log" | |
server.dir-listing = "disable" | |
} | |
# oder auch mal CGI, zum Bleistift cgit | |
$HTTP["host"] == "source.geeksfactory.de" { | |
index-file.names += ( "cgit" ) | |
$HTTP["url"] =~ "^/g" { | |
setenv.add-environment += ( | |
"CGIT_CONFIG" => "/var/www/source.geeksfactory.de/html/g/cgitrc" | |
) | |
cgi.assign = ( "/g/cgit" => "" ) | |
} | |
} | |
cgi.assign += (".py" => "/usr/bin/python") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment