Created
July 15, 2011 16:49
-
-
Save kakra/1085054 to your computer and use it in GitHub Desktop.
PHP Stand-Alone Server based on LigHTTPd
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 | |
TMPNAME=$(mktemp /tmp/lighttpd-fastcgi-php-XXXXXX) | |
cat >$TMPNAME.conf <<-EOF | |
server.bind = "localhost" | |
server.port = "3000" | |
server.document-root = "$(pwd)" | |
server.indexfiles = ("index.php", "index.html", "index.htm", "default.htm") | |
server.modules += ("mod_cgi", "mod_accesslog") | |
include "/etc/lighttpd/mime-types.conf" | |
cgi.assign = (".php" => "/usr/bin/php-cgi") | |
server.follow-symlink = "enable" | |
EOF | |
/usr/sbin/lighttpd -D -f $TMPNAME.conf | |
rm -f $TMPNAME.* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment