diff options
author | Sergey Lukin <sergej.lukin@gmail.com> | 2015-12-04 09:30:06 +0200 |
---|---|---|
committer | Sergey Lukin <sergej.lukin@gmail.com> | 2015-12-04 09:30:06 +0200 |
commit | 6d3d30af5f6cdb789de02909fc0d5800151d8fa1 (patch) | |
tree | 8076d34295a8eb359ec5890e6e7c9fc2fcb07376 /etc/lighttpd | |
parent | 7b24b7b03b6e69f6339282fad25c24fcc4e103ad (diff) | |
download | build-errors-6d3d30af5f6cdb789de02909fc0d5800151d8fa1.tar.bz2 build-errors-6d3d30af5f6cdb789de02909fc0d5800151d8fa1.tar.xz |
php replaced with haserl (no need to run php for several lines of code)
Diffstat (limited to 'etc/lighttpd')
-rw-r--r-- | etc/lighttpd/lighttpd.conf | 32 | ||||
-rw-r--r-- | etc/lighttpd/mod_cgi.conf | 35 |
2 files changed, 67 insertions, 0 deletions
diff --git a/etc/lighttpd/lighttpd.conf b/etc/lighttpd/lighttpd.conf new file mode 100644 index 0000000..a6805cc --- /dev/null +++ b/etc/lighttpd/lighttpd.conf @@ -0,0 +1,32 @@ +var.basedir = "/var/www/localhost" +var.logdir = "/var/log/lighttpd" +var.statedir = "/var/lib/lighttpd" +server.modules = ( + "mod_access", + "mod_setenv", + "mod_simple_vhost", + "mod_accesslog" +) +include "mime-types.conf" +include "mod_cgi.conf" +server.username = "lighttpd" +server.groupname = "lighttpd" +server.document-root = var.basedir + "/htdocs" +server.pid-file = "/var/run/lighttpd.pid" +server.errorlog = var.logdir + "/error.log" +server.indexfiles = ("index.php", "index.lua", "index.html" + "index.htm", "default.htm") +server.follow-symlink = "enable" +static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi", ".lua") +accesslog.filename = var.logdir + "/access.log" +dir-listing.activate = "enable" +dir-listing.hide-dotfiles = "enable" +url.access-deny = ("~", ".inc") +simple-vhost.server-root = "/var/www" +simple-vhost.default-host = "localhost" +simple-vhost.document-root = "/htdocs/" +setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" ) +$HTTP["url"] =~ "\.log\.gz$" { + setenv.add-response-header = ("Content-Encoding" => "x-gzip") + mimetype.assign = (".log.gz" => "text/plain") +} diff --git a/etc/lighttpd/mod_cgi.conf b/etc/lighttpd/mod_cgi.conf new file mode 100644 index 0000000..053f080 --- /dev/null +++ b/etc/lighttpd/mod_cgi.conf @@ -0,0 +1,35 @@ +############################################################################### +# mod_cgi.conf +# 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 $ +############################################################################### + +# +# see cgi.txt for more information on using mod_cgi +# + +server.modules += ("mod_cgi") + +# NOTE: this requires mod_alias +#alias.url = ( +# "/cgi-bin/" => var.basedir + "/cgi-bin/" +#) + +# +# Note that you'll also want to enable the +# cgi-bin alias via mod_alias (above). +# + +$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" + ) +} + +cgi.assign = ( + ".lua" => "" +) |