Created
August 6, 2014 01:26
-
-
Save Tantas/3b44d9d26c9920ace6da to your computer and use it in GitHub Desktop.
Start a lighttpd web server over a development directory.
This file contains hidden or 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
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" | |
) |
This file contains hidden or 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
#!/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