Skip to content

Instantly share code, notes, and snippets.

@Tantas
Created August 6, 2014 01:26
Show Gist options
  • Save Tantas/3b44d9d26c9920ace6da to your computer and use it in GitHub Desktop.
Save Tantas/3b44d9d26c9920ace6da to your computer and use it in GitHub Desktop.
Start a lighttpd web server over a development directory.
server.document-root = "/development/directory/to/serve"
server.dir-listing = "enable"
server.port = 80
mimetype.assign = (
".png" => "image/png",
".jpg" => "image/jpeg",
".xml" => "text/xml",
".html" => "text/html",
".mp4" => "video/mp4",
".webm" => "video/webm",
".ogv" => "video/ogg",
".css" => "text/css",
".js" => "text/javascript"
)
#!/bin/bash
# Get the current directory
scriptPath=${0%/*}
# Start httpd on entire development directory
sudo /usr/local/sbin/lighttpd -D -f ${scriptPath}/httpd.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment