#server.bind = ""
#this is to make sure that it doesn't listent to port 80 port 585 is used by ssl below
server.port = 585 #THIS IS THE PORT THE SERVER IS LISTENING ON, you can change this to any available port
server.tag ="lighttpd"
fastcgi.debug = 1
server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_compress",
"mod_expire",
"mod_redirect",
"mod_rewrite",
"mod_fastcgi"
)
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".html" => "text/html",
".htm" => "text/html",
".txt" => "text/plain" )
$HTTP["host"] =~ "Subdomain1\.duckdns\.org" { #CHANGE Subdomain1YOUR DUCKDNS SUBDOMAIN
server.document-root = "/var/www/hal8000"
server.errorlog = "/var/log/lighttpd/Subdomain1/error.log"
index-file.names = ( "index.php", "index.py", "index.html", "index.htm" )
accesslog.filename = "/var/log/lighttpd/Subdomain2/access.log"
server.error-handler-404 = "/e404.php"
compress.filetype = ( "text/plain", "text/html", "text/css", "text/xml", "text/x-js", "text/javascript", "application/x-javascript", "application/javascript" )
}
$HTTP["host"] =~ "Subdomain2\.duckdns\.org" {
server.document-root = "/var/www/smilez"
server.errorlog = "/var/log/lighttpd/Subdomain2/error.log"
index-file.names = ( "index.php", "index.py", "index.html", "index.htm" )
accesslog.filename = "/var/log/lighttpd/Subdomain2/access.log"
server.error-handler-404 = "/e404.php"
compress.filetype = ( "text/plain", "text/html", "text/css", "text/xml", "text/x-js", "text/javascript", "application/x-javascript", "application/javascript" )
}
# You would uncomment this if only want ssl if he socket is 444 this is a condtitional. but we want ssl all the time
#$SERVER["socket"] == ":585" {
ssl.engine = "enable"
ssl.pemfile = "/etc/letsencrypt/live/Subdomain1.duckdns.org/ssl.pem"
ssl.ca-file = "/etc/letsencrypt/live/Subdomain1.duckdns.org/fullchain.pem"
ssl.dh-file = "/etc/ssl/certs/dhparam.pem"
ssl.ec-curve = "secp384r1"
ssl.honor-cipher-order = "enable"
ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
ssl.use-compression = "disable"
setenv.add-response-header = (
"Strict-Transport-Security" => "max-age=63072000; includeSubdomains; preload",
"X-Frame-Options" => "DENY",
"X-Content-Type-Options" => "nosniff"
)
ssl.use-sslv2 = "disable"
ssl.use-sslv3 = "disable"
#} # end ofconditionalwe are not using
server.document-root = "/var/www/html"
index-file.names = ( "index.php", "index.py", "index.html", "index.htm" )
accesslog.filename = "/var/log/lighttpd/access.log"
server.errorlog = "/var/log/lighttpd/error.log"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.username = "lighttpd"
server.groupname = "lighttpd"
server.pid-file = "/var/run/lighttpd.pid"
## Deny access to the source code of these files:
static-file.exclude-extensions = ( ".php", ".pl", ".py", ".fcgi" )
## Deny access the file-extensions
url.access-deny = ( "~", ".inc" )
## Enable/Disable Directory Listings
dir-listing.encoding = "utf-8"
dir-listing.activate = "disable"
dir-listing.hide-dotfiles = "enable"
## eTags
etag.use-inode = "enable"
etag.use-mtime = "enable"
etag.use-size = "enable"
static-file.etags = "enable"
## Compress module
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "text/plain", "text/html", "text/css", "text/xml", "text/x-js", "text/javascript", "application/x-javascript", "application/javascript" )
## Expire Models
$HTTP["url"] =~ "(css|js|png|jpg|ico|gif)$" {
expire.url = ( "" => "access 7 days" )
}
#expire.url = (
# "/images/" => "access plus 7 days",
# "/jquery/" => "access plus 2 weeks",
# "/js/" => "access plus 2 months",
# "/misc" => "access plus 1 days",
# "/themes/" => "access plus 7 days",
# "/modules/" => "access plus 24 hours"
#)
## Enable PHP
fastcgi.server = ( ".php" => ((
#"bin-path" => "/usr/bin/php5-cgi",
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket"
)))
## Load enabled configuration files
#include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
#include_shell "/usr/local/share/lighttpd/include-sites-enabled.pl"