Skip to content

Instantly share code, notes, and snippets.

@Neo-Oli
Created December 20, 2016 20:43
Show Gist options
  • Save Neo-Oli/e4458243d15d0aa242c67f33c2833346 to your computer and use it in GitHub Desktop.
Save Neo-Oli/e4458243d15d0aa242c67f33c2833346 to your computer and use it in GitHub Desktop.
lighttpd -D -f ~/.lighttpd/lighttpd.con
server.document-root = "/data/data/com.termux/files/home/www"
server.upload-dirs = ("/data/data/com.termux/files/home/.lighttpd/upload")
server.port = 8080
#load modules
server.modules = (
"mod_redirect",
"mod_auth",
#"mod_cgi",
"mod_accesslog",
"mod_setenv",
"mod_fastcgi"
)
# where to send error-messages to
server.errorlog = "/data/data/com.termux/files/home/.lighttpd/lighttpd.error.log"
#Access Log
accesslog.filename = "/data/data/com.termux/files/home/.lighttpd/lighttpd.access.log"
#Mime Types
mimetype.assign = (
".html" => "text/html",
".css" => "text/css",
".txt" => "text/plain",
".jpg" => "image/jpeg",
".png" => "image/png",
".svg" => "image/svg+xml",
".pdf" => "application/pdf"
)
# Set up CGI
#cgi.assign = (".php" => "/data/data/com.termux/files/usr/bin/php-cgi" )
fastcgi.server = (
".php" =>
(( "host" => "127.0.0.1",
"port" => 8026,
"bin-path" => "/data/data/com.termux/files/usr/bin/php-cgi -c /data/data/com.termux/files/home/.lighttpd/php.ini"
))
)
# Index files
index-file.names = ( "index.php", "index.html","index.htm", "default.htm" )
#enable dir-listing
$HTTP["url"] == "/" { server.dir-listing = "enable" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment