diff --git a/rootfs/usr/local/share/template-files/config/lighttpd/lighttpd.conf b/rootfs/usr/local/share/template-files/config/lighttpd/lighttpd.conf index eb329d9..02a5048 100644 --- a/rootfs/usr/local/share/template-files/config/lighttpd/lighttpd.conf +++ b/rootfs/usr/local/share/template-files/config/lighttpd/lighttpd.conf @@ -12,7 +12,6 @@ server.modules = ( "mod_redirect", "mod_alias", "mod_access", - "mod_fastcgi", "mod_status", "mod_setenv", "mod_proxy", @@ -26,7 +25,9 @@ server.modules = ( "mod_secdownload", "mod_rrdtool", "mod_webdav", - "mod_accesslog" + "mod_accesslog", + "mod_cgi", + "mod_fastcgi" ) server.username = "lighttpd" @@ -39,29 +40,21 @@ server.document-root = "/data/htdocs/www" server.tag = "lighttpd" server.follow-symlink = "enable" server.errorfile-prefix = var.basedir + "/error/status-" -server.indexfiles = ("index.php", "index.html","index.htm", "default.htm") +server.indexfiles = ("index.php", "index.html","index.htm", "default.htm", "index.lighttpd.html") server.pid-file = "/tmp/lighttpd.pid" -server.errorlog = var.logdir + "/error.log" -accesslog.filename = var.logdir + "/access.log" +server.errorlog = "/proc/self/fd/1" +accesslog.filename = "/proc/self/fd/1" static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi") include "mime-types.conf" include "mod_cgi.conf" +include "mod_fastcgi_fpm.conf" url.access-deny = ("~", ".inc") ssi.extension = (".shtml") status.status-url = "/server-status" status.config-url = "/server-config" -proxy.server = ( ".php" => - ( "localhost" => - ( - "host" => "127.0.0.1", - "port" => 9000 - ) - ) - ) - # vim: set ft=conf foldmethod=marker et : diff --git a/rootfs/usr/local/share/template-files/config/lighttpd/mod_cgi.conf b/rootfs/usr/local/share/template-files/config/lighttpd/mod_cgi.conf index 9008615..2a2b66d 100644 --- a/rootfs/usr/local/share/template-files/config/lighttpd/mod_cgi.conf +++ b/rootfs/usr/local/share/template-files/config/lighttpd/mod_cgi.conf @@ -3,22 +3,21 @@ # include'd by lighttpd.conf. # $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/conf/mod_cgi.conf,v 1.1 2005/08/27 12:36:13 ka0ttic Exp $ ############################################################################### -server.modules += ("mod_cgi") # NOTE: this requires mod_alias alias.url = ( "/cgi-bin/" => "/data/htdocs/cgi-bin" ) +cgi.assign = ( + ".pl" => "/usr/bin/perl", + ".cgi" => "/usr/bin/perl", + ".rb" => "/usr/bin/ruby", + ".py" => "/usr/bin/python" + ".php" => "/usr/bin/php-cgi" +) + $HTTP["url"] =~ "^/cgi-bin/" { - # disable directory listings - dir-listing.activate = "disable" - # only allow cgi's in this directory - cgi.assign = ( - ".pl" => "/usr/bin/perl", - ".cgi" => "/usr/bin/perl", - ".rb" => "/usr/bin/ruby", - ".py" => "/usr/bin/python" - ) + dir-listing.activate = "disable" } # vim: set ft=conf foldmethod=marker et : diff --git a/rootfs/usr/local/share/template-files/config/lighttpd/mod_fastcgi_fpm.conf b/rootfs/usr/local/share/template-files/config/lighttpd/mod_fastcgi_fpm.conf new file mode 100644 index 0000000..ae40e56 --- /dev/null +++ b/rootfs/usr/local/share/template-files/config/lighttpd/mod_fastcgi_fpm.conf @@ -0,0 +1,20 @@ +############################################################################### +# mod_fastcgi_fpm.conf +# include'd by lighttpd.conf. +############################################################################### +fastcgi.server = ( ".php" => + ( "localhost" => + ( + "host" => "127.0.0.1", + "port" => "9000" + ) + ) + ) + +fastcgi.map-extensions = ( ".php3" => ".php", + ".php4" => ".php", + ".php5" => ".php", + ".phps" => ".php", + ".phtml" => ".php" ) + +# vim: set ft=conf foldmethod=marker et :