1*76404edcSAsim Jamshed#######################################################################
2*76404edcSAsim Jamshed##
3*76404edcSAsim Jamshed## For more examples check:
4*76404edcSAsim Jamshed##
5*76404edcSAsim Jamshed## http://www.lighttpd.net/documentation/configuration.html#conditional-configuration
6*76404edcSAsim Jamshed##
7*76404edcSAsim Jamshed$HTTP["host"] == "download.example.com" {
8*76404edcSAsim Jamshed  var.server_name = "download.example.com"
9*76404edcSAsim Jamshed
10*76404edcSAsim Jamshed  server.name = server_name
11*76404edcSAsim Jamshed  ##
12*76404edcSAsim Jamshed  ## use trigger before download
13*76404edcSAsim Jamshed  ##
14*76404edcSAsim Jamshed  include "conf.d/trigger_b4_dl.conf"
15*76404edcSAsim Jamshed
16*76404edcSAsim Jamshed  server.document-root = vhosts_dir + "/example.com/download/htdocs"
17*76404edcSAsim Jamshed  ##
18*76404edcSAsim Jamshed  ## use a seperate access log file
19*76404edcSAsim Jamshed  ## At the moment you cant have different error log files.
20*76404edcSAsim Jamshed  ##
21*76404edcSAsim Jamshed  accesslog.filename          = log_root + "/" + server_name "/access.log"
22*76404edcSAsim Jamshed}
23*76404edcSAsim Jamshed
24*76404edcSAsim Jamshed$SERVER["socket"] == "127.0.0.1:443" {
25*76404edcSAsim Jamshed  server.name = "localhost"
26*76404edcSAsim Jamshed  ssl.pemfile = "/etc/ssl/private/lighttpd-localhost.pem"
27*76404edcSAsim Jamshed  ssl.engine  = "enable"
28*76404edcSAsim Jamshed
29*76404edcSAsim Jamshed  server.document-root = vhosts_dir + "/ssl-localhost/pages/"
30*76404edcSAsim Jamshed}
31*76404edcSAsim Jamshed
32*76404edcSAsim Jamshed##
33*76404edcSAsim Jamshed#######################################################################
34