summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-08-22 20:51:08 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-08-22 20:51:08 +0000
commit316232e3500fddca44e279ebebd1ab081c0d57d0 (patch)
tree5ebb8e804634a3414221e57def275a7594edfa81
parentc42c4ccdb19dde71713db5c51955c923a20506fe (diff)
downloadlighttpd-316232e3500fddca44e279ebebd1ab081c0d57d0.tar.gz
[tests] search for perl in PATH instead of /usr/bin; whitespace + test config cleanups
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3019 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--tests/404-handler.conf33
-rw-r--r--[-rwxr-xr-x]tests/LightyTest.pm79
-rw-r--r--tests/bug-06.conf237
-rw-r--r--tests/bug-12.conf233
-rw-r--r--tests/condition.conf79
-rwxr-xr-xtests/docroot/www/404.fcgi4
-rwxr-xr-xtests/docroot/www/404.pl4
-rw-r--r--tests/docroot/www/cgi-pathinfo.pl2
-rw-r--r--tests/docroot/www/cgi.pl2
-rw-r--r--tests/docroot/www/get-header.pl2
-rw-r--r--tests/docroot/www/get-post-len.pl4
-rwxr-xr-xtests/docroot/www/ip.pl2
-rwxr-xr-xtests/docroot/www/nph-status.pl2
-rwxr-xr-xtests/docroot/www/send404.pl2
-rw-r--r--tests/fastcgi-10.conf203
-rw-r--r--tests/fastcgi-13.conf217
-rw-r--r--tests/fastcgi-auth.conf224
-rw-r--r--tests/fastcgi-responder.conf233
-rw-r--r--tests/lighttpd.conf335
-rw-r--r--tests/lowercase.conf121
-rw-r--r--tests/mod-compress.conf12
-rw-r--r--tests/mod-extforward.conf10
-rwxr-xr-xtests/mod-fastcgi.t9
-rwxr-xr-xtests/mod-proxy.t7
-rwxr-xr-xtests/mod-rewrite.t6
-rw-r--r--tests/mod-simplevhost.conf9
-rw-r--r--tests/proxy.conf240
-rw-r--r--tests/var-include-sub.conf38
-rw-r--r--tests/var-include.conf36
29 files changed, 1200 insertions, 1185 deletions
diff --git a/tests/404-handler.conf b/tests/404-handler.conf
index 03dfd973..e07ff3f9 100644
--- a/tests/404-handler.conf
+++ b/tests/404-handler.conf
@@ -15,35 +15,28 @@ server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-server.modules = (
- "mod_fastcgi",
- "mod_cgi",
- "mod_accesslog" )
+server.modules = (
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_accesslog",
+)
######################## MODULE CONFIG ############################
accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-mimetype.assign = ( ".html" => "text/html" )
+mimetype.assign = (
+ ".html" => "text/html",
+)
-cgi.assign = (".pl" => "/usr/bin/perl" )
-
-# fastcgi.server += ( "/404.pl" =>
-# ( "404-handler" =>
-# (
-# "socket" => env.SRCDIR + "/tmp/pl-404-fastcgi-1.socket",
-# "bin-path" => server.document-root + "/404.pl",
-# "max-procs" => 1,
-# "check-local" => "disable",
-# "broken-scriptfilename" => "enable",
-# )
-# ),
-# )
+cgi.assign = (
+ ".pl" => env.PERL,
+)
$HTTP["url"] =~ "^/static/" {
- server.error-handler-404 = "/404.html"
+ server.error-handler-404 = "/404.html"
}
else $HTTP["url"] =~ "." {
- server.error-handler-404 = "/404.pl"
+ server.error-handler-404 = "/404.pl"
}
diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm
index 36029dc8..da65bec7 100755..100644
--- a/tests/LightyTest.pm
+++ b/tests/LightyTest.pm
@@ -1,6 +1,5 @@
-#! /usr/bin/perl -w
-
package LightyTest;
+
use strict;
use IO::Socket;
use Test::More;
@@ -9,11 +8,46 @@ use Cwd 'abs_path';
use POSIX qw(:sys_wait_h dup2);
use Errno qw(EADDRINUSE);
+sub find_program {
+ my @DEFAULT_PATHS = ('/usr/bin/', '/usr/local/bin/');
+ my ($envname, $program) = @_;
+ my $location;
+
+ if (defined $ENV{$envname}) {
+ $location = $ENV{$envname};
+ } else {
+ $location = `which "$program" 2>/dev/null`;
+ if (! -x $location) {
+ for my $path (@DEFAULT_PATHS) {
+ $location = $path . $program;
+ last if -x $location;
+ }
+ }
+ }
+
+ if (-x $location) {
+ $ENV{$envname} = $location;
+ return 1;
+ } else {
+ delete $ENV{$envname};
+ return 0;
+ }
+}
+
+BEGIN {
+ our $HAVE_PHP = find_program('PHP', 'php-cgi');
+ our $HAVE_PERL = find_program('PERL', 'perl');
+ if (!$HAVE_PERL) {
+ die "Couldn't find path to perl, but it obviously seems to be running";
+ }
+}
+
sub mtime {
my $file = shift;
my @stat = stat $file;
return @stat ? $stat[9] : 0;
}
+
sub new {
my $class = shift;
my $self = {};
@@ -58,10 +92,10 @@ sub listening_on {
my $self = shift;
my $port = shift;
- my $remote =
- IO::Socket::INET->new(Proto => "tcp",
- PeerAddr => "127.0.0.1",
- PeerPort => $port) or return 0;
+ my $remote = IO::Socket::INET->new(
+ Proto => "tcp",
+ PeerAddr => "127.0.0.1",
+ PeerPort => $port) or return 0;
close $remote;
@@ -165,14 +199,15 @@ sub handle_http {
my $slow = defined $t->{SLOWREQUEST};
my $is_debug = $ENV{"TRACE_HTTP"};
- my $remote =
- IO::Socket::INET->new(Proto => "tcp",
- PeerAddr => $host,
- PeerPort => $self->{PORT});
+ my $remote =
+ IO::Socket::INET->new(
+ Proto => "tcp",
+ PeerAddr => $host,
+ PeerPort => $self->{PORT});
if (not defined $remote) {
diag("\nconnect failed: $!");
- return -1;
+ return -1;
}
$remote->autoflush(1);
@@ -208,7 +243,7 @@ sub handle_http {
print $remote "\012";
select(undef, undef, undef, 0.1);
}
-
+
}
diag("\n... done") if $is_debug;
@@ -221,7 +256,7 @@ sub handle_http {
diag(">> ".$_) if $is_debug;
}
diag("\n... done") if $is_debug;
-
+
close $remote;
my $full_response = $lines;
@@ -250,8 +285,8 @@ sub handle_http {
(my $h = $1) =~ tr/[A-Z]/[a-z]/;
if (defined $resp_hdr{$h}) {
-# diag(sprintf("\nheader '%s' is duplicated: '%s' and '%s'\n",
-# $h, $resp_hdr{$h}, $2));
+# diag(sprintf("\nheader '%s' is duplicated: '%s' and '%s'\n",
+# $h, $resp_hdr{$h}, $2));
$resp_hdr{$h} .= ', '.$2;
} else {
$resp_hdr{$h} = $2;
@@ -307,7 +342,7 @@ sub handle_http {
return -1;
}
}
-
+
if (defined $href->{'-HTTP-Content'}) {
if (defined $resp_body && $resp_body ne '') {
diag(sprintf("\nbody failed: expected empty body, got '%s'", $resp_body));
@@ -334,7 +369,7 @@ sub handle_http {
$k = substr($k, 1);
$key_inverted = 1;
$verify_value = 0; ## skip the value check
- }
+ }
if ($key_inverted) {
if (defined $resp_hdr{$k}) {
@@ -351,13 +386,15 @@ sub handle_http {
if ($verify_value) {
if ($href->{$_} =~ /^\/(.+)\/$/) {
if ($resp_hdr{$k} !~ /$1/) {
- diag(sprintf("\nresponse-header failed: expected '%s', got '%s', regex: %s",
- $href->{$_}, $resp_hdr{$k}, $1));
+ diag(sprintf(
+ "\nresponse-header failed: expected '%s', got '%s', regex: %s",
+ $href->{$_}, $resp_hdr{$k}, $1));
return -1;
}
} elsif ($href->{$_} ne $resp_hdr{$k}) {
- diag(sprintf("\nresponse-header failed: expected '%s', got '%s'",
- $href->{$_}, $resp_hdr{$k}));
+ diag(sprintf(
+ "\nresponse-header failed: expected '%s', got '%s'",
+ $href->{$_}, $resp_hdr{$k}));
return -1;
}
}
diff --git a/tests/bug-06.conf b/tests/bug-06.conf
index 8835535e..775ce6da 100644
--- a/tests/bug-06.conf
+++ b/tests/bug-06.conf
@@ -3,8 +3,6 @@ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.o
## bind to port (default: 80)
server.port = 2048
-# server.license = "00000001000000013feccb804014587f000000010000000105911c976a3d462c8eaa2d7ca850432c"
-
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
@@ -12,152 +10,129 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-
-##
-## Format: <errorfile-prefix><status>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
-
server.dir-listing = "enable"
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_setenv",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
- "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_cgi",
- "mod_compress",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.html",
- "index.htm", "default.htm", "index.php" )
-
-#,-- only root can use these options
-#|
-#|# chroot() to directory (default: no chroot() )
-#| server.chroot /
-#|# change uid to <uid> (default: don't care)
-#| server.userid wwwrun
-#|# change uid to <uid> (default: don't care)
-#| server.groupid wwwrun
-#|
-#`--
-
+server.modules = (
+ "mod_rewrite",
+ "mod_setenv",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_simple_vhost",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_compress",
+ "mod_accesslog",
+)
+
+server.indexfiles = (
+ "index.html",
+ "index.htm",
+ "default.htm",
+ "index.php",
+)
######################## MODULE CONFIG ############################
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
-compress.filetype = ("text/plain", "text/html")
-
-setenv.add-environment = ( "TRAC_ENV" => "foo")
-setenv.add-request-header = ( "FOO" => "foo")
-setenv.add-response-header = ( "BAR" => "foo")
-
-fastcgi.debug = 0
-fastcgi.server = ( ".php" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 1026,
-# "mode" => "authorizer",
-# "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
- )
- )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-
-
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
-
-auth.backend = "plain"
-auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+setenv.add-environment = (
+ "TRAC_ENV" => "foo",
+)
+setenv.add-request-header = (
+ "FOO" => "foo",
+)
+setenv.add-response-header = (
+ "BAR" => "foo",
+)
+
+fastcgi.debug = 0
+fastcgi.server = ( ".php" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ ),
+))
+
+auth.backend = "plain"
+auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
-auth.backend.ldap.hostname = "localhost"
-auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
-auth.backend.ldap.filter = "(uid=$)"
-
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
-
-expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.backend.ldap.hostname = "localhost"
+auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
+auth.backend.ldap.filter = "(uid=$)"
+
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/auth.php" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "user=jan",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+)
+
+expire.url = (
+ "/buggy/" => "access 2 hours",
+ "/asdhas/" => "access plus 1 seconds 2 minutes",
+)
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
simple-vhost.document-root = "pages"
simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
simple-vhost.default-host = "www.example.org"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
}
-
diff --git a/tests/bug-12.conf b/tests/bug-12.conf
index 61cba0e6..8ca79153 100644
--- a/tests/bug-12.conf
+++ b/tests/bug-12.conf
@@ -3,8 +3,6 @@ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.o
## bind to port (default: 80)
server.port = 2048
-# server.license = "00000001000000013feccb804014587f000000010000000105911c976a3d462c8eaa2d7ca850432c"
-
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
@@ -13,153 +11,130 @@ server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-##
-## Format: <errorfile-prefix><status>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
-
-server.dir-listing = "enable"
-
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_setenv",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
- "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_cgi",
- "mod_compress",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.html",
- "index.htm", "default.htm", "index.php" )
+server.dir-listing = "enable"
+
+server.modules = (
+ "mod_rewrite",
+ "mod_setenv",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_simple_vhost",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_compress",
+ "mod_accesslog",
+)
+
+server.indexfiles = (
+ "index.html",
+ "index.htm",
+ "default.htm",
+ "index.php",
+)
server.error-handler-404 = "/indexfile/return-404.php"
-#,-- only root can use these options
-#|
-#|# chroot() to directory (default: no chroot() )
-#| server.chroot /
-#|# change uid to <uid> (default: don't care)
-#| server.userid wwwrun
-#|# change uid to <uid> (default: don't care)
-#| server.groupid wwwrun
-#|
-#`--
-
-
######################## MODULE CONFIG ############################
-
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
-compress.filetype = ("text/plain", "text/html")
-
-setenv.add-environment = ( "TRAC_ENV" => "foo")
-setenv.add-request-header = ( "FOO" => "foo")
-setenv.add-response-header = ( "BAR" => "foo")
-
-fastcgi.debug = 0
-fastcgi.server = ( ".php" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 1026,
-# "mode" => "authorizer",
-# "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
- )
- )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-
-
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
-
-auth.backend = "plain"
-auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+setenv.add-environment = (
+ "TRAC_ENV" => "foo",
+)
+setenv.add-request-header = (
+ "FOO" => "foo",
+)
+setenv.add-response-header = (
+ "BAR" => "foo",
+)
+
+fastcgi.debug = 0
+fastcgi.server = ( ".php" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ ),
+))
+
+auth.backend = "plain"
+auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
auth.backend.ldap.filter = "(uid=$)"
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
-
-expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/auth.php" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "user=jan",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+)
+
+expire.url = (
+ "/buggy/" => "access 2 hours",
+ "/asdhas/" => "access plus 1 seconds 2 minutes",
+)
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
simple-vhost.document-root = "pages"
simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
simple-vhost.default-host = "www.example.org"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
}
-
diff --git a/tests/condition.conf b/tests/condition.conf
index d1e88821..e0b36821 100644
--- a/tests/condition.conf
+++ b/tests/condition.conf
@@ -15,55 +15,74 @@ server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-server.modules = (
- "mod_redirect",
- "mod_accesslog" )
+server.modules = (
+ "mod_redirect",
+ "mod_accesslog",
+)
######################## MODULE CONFIG ############################
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-mimetype.assign = ( ".html" => "text/html" )
+mimetype.assign = (
+ ".html" => "text/html",
+)
-url.redirect = ("^" => "/default")
+url.redirect = (
+ "^" => "/default",
+)
$HTTP["host"] == "www.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "www.example.org"
- url.redirect = ("^" => "/match_1")
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "www.example.org"
+ url.redirect = (
+ "^" => "/match_1",
+ )
}
else $HTTP["host"] == "test1.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "test1.example.org"
- url.redirect = ("^" => "/match_2")
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test1.example.org"
+ url.redirect = (
+ "^" => "/match_2",
+ )
}
# comments
else $HTTP["host"] == "test2.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "test2.example.org"
- url.redirect = ("^" => "/match_3")
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test2.example.org"
+ url.redirect = (
+ "^" => "/match_3",
+ )
}
# comments
else $HTTP["host"] == "test3.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "test3.example.org"
- url.redirect = ("^" => "/match_4")
-
- # comments
- $HTTP["url"] == "/index.html" {
- url.redirect = ("^" => "/match_5")
- }
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test3.example.org"
+ url.redirect = (
+ "^" => "/match_4",
+ )
+
+ # comments
+ $HTTP["url"] == "/index.html" {
+ url.redirect = (
+ "^" => "/match_5",
+ )
+ }
}
else $HTTP["host"] == "test4.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "test4.example.org"
- url.redirect = ("^" => "/match_6")
-
- $HTTP["url"] =~ "^/subdir/" {
- url.redirect = ("^" => "/match_7")
- }
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test4.example.org"
+ url.redirect = (
+ "^" => "/match_6",
+ )
+
+ $HTTP["url"] =~ "^/subdir/" {
+ url.redirect = (
+ "^" => "/match_7",
+ )
+ }
}
diff --git a/tests/docroot/www/404.fcgi b/tests/docroot/www/404.fcgi
index 468089f8..f98c3f6c 100755
--- a/tests/docroot/www/404.fcgi
+++ b/tests/docroot/www/404.fcgi
@@ -1,6 +1,8 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
+
#use CGI qw/:standard/;
use CGI::Fast qw(:standard);
+
my $cgi = new CGI;
while (new CGI::Fast) {
my $request_uri = $ENV{'REQUEST_URI'};
diff --git a/tests/docroot/www/404.pl b/tests/docroot/www/404.pl
index 0f743d03..9486ed66 100755
--- a/tests/docroot/www/404.pl
+++ b/tests/docroot/www/404.pl
@@ -1,5 +1,7 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
+
use CGI qw/:standard/;
+
my $cgi = new CGI;
my $request_uri = $ENV{'REQUEST_URI'};
print (STDERR "REQUEST_URI: $request_uri\n");
diff --git a/tests/docroot/www/cgi-pathinfo.pl b/tests/docroot/www/cgi-pathinfo.pl
index 7bebb0c9..6b3a3355 100644
--- a/tests/docroot/www/cgi-pathinfo.pl
+++ b/tests/docroot/www/cgi-pathinfo.pl
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#!/usr/bin/env perl
print "Content-Type: text/html\r\n\r\n";
diff --git a/tests/docroot/www/cgi.pl b/tests/docroot/www/cgi.pl
index 88ae6d35..6269bd2f 100644
--- a/tests/docroot/www/cgi.pl
+++ b/tests/docroot/www/cgi.pl
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#!/usr/bin/env perl
print "Content-Type: text/html\r\n\r\n";
diff --git a/tests/docroot/www/get-header.pl b/tests/docroot/www/get-header.pl
index 905f3e79..1e19677d 100644
--- a/tests/docroot/www/get-header.pl
+++ b/tests/docroot/www/get-header.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
my $s = $ENV{$ENV{"QUERY_STRING"}};
diff --git a/tests/docroot/www/get-post-len.pl b/tests/docroot/www/get-post-len.pl
index bac8bbf8..82276bd6 100644
--- a/tests/docroot/www/get-post-len.pl
+++ b/tests/docroot/www/get-post-len.pl
@@ -1,5 +1,4 @@
-#!/usr/bin/perl
-
+#!/usr/bin/env perl
print "Content-Type: text/plain\r\n\r\n";
@@ -12,4 +11,3 @@ if ($ENV{"REQUEST_METHOD"} eq "POST") {
} else {
print "0";
}
-
diff --git a/tests/docroot/www/ip.pl b/tests/docroot/www/ip.pl
index 6c9e993a..fa56ddcf 100755
--- a/tests/docroot/www/ip.pl
+++ b/tests/docroot/www/ip.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
print "Content-Type: text/html\r\n\r\n";
print $ENV{'REMOTE_ADDR'};
diff --git a/tests/docroot/www/nph-status.pl b/tests/docroot/www/nph-status.pl
index d817c7fd..b42da741 100755
--- a/tests/docroot/www/nph-status.pl
+++ b/tests/docroot/www/nph-status.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
my $status = 200;
diff --git a/tests/docroot/www/send404.pl b/tests/docroot/www/send404.pl
index a92dfa6c..7a8ab0e7 100755
--- a/tests/docroot/www/send404.pl
+++ b/tests/docroot/www/send404.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use CGI qw/:standard/;
print header ( -status => 404
-type => 'text/plain' );
diff --git a/tests/fastcgi-10.conf b/tests/fastcgi-10.conf
index 1fa50fbe..0d96b7eb 100644
--- a/tests/fastcgi-10.conf
+++ b/tests/fastcgi-10.conf
@@ -10,81 +10,72 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-##
-## Format: <errorfile-prefix><status>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
-
server.dir-listing = "enable"
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
-# "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_cgi",
- "mod_compress",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.php", "index.html",
- "index.htm", "default.htm" )
-
+server.modules = (
+ "mod_rewrite",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_compress",
+ "mod_accesslog",
+)
+
+server.indexfiles = (
+ "index.php",
+ "index.html",
+ "index.htm",
+ "default.htm",
+)
######################## MODULE CONFIG ############################
-
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
-compress.filetype = ("text/plain", "text/html")
-
-fastcgi.debug = 0
-fastcgi.server = ( ".php" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 1026
- )
- )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-
-
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
-
-auth.backend = "plain"
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+fastcgi.debug = 0
+fastcgi.server = (
+ ".php" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ ),
+ ),
+)
+
+cgi.assign = (
+ ".pl" => env.PERL,
+ ".cgi" => env.PERL,
+)
+
+auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
@@ -92,47 +83,47 @@ auth.backend.ldap.hostname = "localhost"
auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
auth.backend.ldap.filter = "(uid=$)"
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
-
-expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/auth.php" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "user=jan",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+)
+
+expire.url = (
+ "/buggy/" => "access 2 hours",
+ "/asdhas/" => "access plus 1 seconds 2 minutes",
+)
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
}
-
diff --git a/tests/fastcgi-13.conf b/tests/fastcgi-13.conf
index 499a7f55..7709e020 100644
--- a/tests/fastcgi-13.conf
+++ b/tests/fastcgi-13.conf
@@ -14,94 +14,75 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-##
-## Format: <errorfile-prefix><status>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
-
server.dir-listing = "enable"
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
-# "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_cgi",
- "mod_compress",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.php", "index.html",
- "index.htm", "default.htm" )
-
-#,-- only root can use these options
-#|
-#|# chroot() to directory (default: no chroot() )
-#| server.chroot /
-#|# change uid to <uid> (default: don't care)
-#| server.userid wwwrun
-#|# change uid to <uid> (default: don't care)
-#| server.groupid wwwrun
-#|
-#`--
-
+server.modules = (
+ "mod_rewrite",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_compress",
+ "mod_accesslog"
+)
+
+server.indexfiles = (
+ "index.php",
+ "index.html",
+ "index.htm",
+ "default.htm",
+)
######################## MODULE CONFIG ############################
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
-compress.filetype = ("text/plain", "text/html")
-
-fastcgi.debug = 0
-fastcgi.server = ( ".php" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 1048,
- "bin-path" => env.PHP,
- "bin-copy-environment" => ( "PATH", "SHELL", "USER" ),
- )
- )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-
-
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
-
-auth.backend = "plain"
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+fastcgi.debug = 0
+fastcgi.server = (
+ ".php" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 1048,
+ "bin-path" => env.PHP,
+ "bin-copy-environment" => ( "PATH", "SHELL", "USER", ),
+ ),
+ ),
+)
+
+cgi.assign = (
+ ".pl" => env.PERL,
+ ".cgi" => env.PERL,
+)
+
+auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
@@ -109,47 +90,47 @@ auth.backend.ldap.hostname = "localhost"
auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
auth.backend.ldap.filter = "(uid=$)"
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
-
-expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/auth.php" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "user=jan",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+)
+
+expire.url = (
+ "/buggy/" => "access 2 hours",
+ "/asdhas/" => "access plus 1 seconds 2 minutes",
+)
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
}
-
diff --git a/tests/fastcgi-auth.conf b/tests/fastcgi-auth.conf
index 47a9268d..0bdc0f2f 100644
--- a/tests/fastcgi-auth.conf
+++ b/tests/fastcgi-auth.conf
@@ -7,8 +7,6 @@ debug.log-request-handling = "enable"
## bind to port (default: 80)
server.port = 2048
-# server.license = "00000001000000013feccb804014587f000000010000000105911c976a3d462c8eaa2d7ca850432c"
-
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
@@ -16,97 +14,77 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-##
-## Format: <errorfile-prefix><status>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
-
server.dir-listing = "enable"
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
-# "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_cgi",
- "mod_compress",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.php", "index.html",
- "index.htm", "default.htm" )
-
-#,-- only root can use these options
-#|
-#|# chroot() to directory (default: no chroot() )
-#| server.chroot /
-#|# change uid to <uid> (default: don't care)
-#| server.userid wwwrun
-#|# change uid to <uid> (default: don't care)
-#| server.groupid wwwrun
-#|
-#`--
-
+server.modules = (
+ "mod_rewrite",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_compress",
+ "mod_accesslog",
+)
+
+server.indexfiles = (
+ "index.php",
+ "index.html",
+ "index.htm",
+ "default.htm",
+)
######################## MODULE CONFIG ############################
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
-compress.filetype = ("text/plain", "text/html")
-
-fastcgi.debug = 0
-fastcgi.server = ( "/" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 20000,
- "bin-path" => env.SRCDIR + "/fcgi-auth",
- "mode" => "authorizer",
- "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
- "check-local" => "disable",
-
- )
- )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-
-
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
-
-auth.backend = "plain"
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+fastcgi.debug = 0
+fastcgi.server = (
+ "/" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 20000,
+ "bin-path" => env.SRCDIR + "/fcgi-auth",
+ "mode" => "authorizer",
+ "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
+ "check-local" => "disable",
+ ),
+ ),
+)
+
+cgi.assign = (
+ ".pl" => env.PERL,
+ ".cgi" => env.PERL,
+)
+
+auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
@@ -114,47 +92,49 @@ auth.backend.ldap.hostname = "localhost"
auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
auth.backend.ldap.filter = "(uid=$)"
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
-
-expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/auth.php" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "user=jan",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+)
+
+expire.url = (
+ "/buggy/" => "access 2 hours",
+ "/asdhas/" => "access plus 1 seconds 2 minutes",
+)
+
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
}
diff --git a/tests/fastcgi-responder.conf b/tests/fastcgi-responder.conf
index 0f6c1dc8..d15760dc 100644
--- a/tests/fastcgi-responder.conf
+++ b/tests/fastcgi-responder.conf
@@ -10,8 +10,6 @@ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.o
## bind to port (default: 80)
server.port = 2048
-# server.license = "00000001000000013feccb804014587f000000010000000105911c976a3d462c8eaa2d7ca850432c"
-
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
@@ -19,94 +17,75 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-##
-## Format: <errorfile-prefix><status>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
-
server.dir-listing = "enable"
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
-# "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_cgi",
- "mod_compress",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.php", "index.html",
- "index.htm", "default.htm" )
-
-#,-- only root can use these options
-#|
-#|# chroot() to directory (default: no chroot() )
-#| server.chroot /
-#|# change uid to <uid> (default: don't care)
-#| server.userid wwwrun
-#|# change uid to <uid> (default: don't care)
-#| server.groupid wwwrun
-#|
-#`--
-
+server.modules = (
+ "mod_rewrite",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_compress",
+ "mod_accesslog",
+)
+
+server.indexfiles = (
+ "index.php",
+ "index.html",
+ "index.htm",
+ "default.htm",
+)
######################## MODULE CONFIG ############################
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
-compress.filetype = ("text/plain", "text/html")
-
-fastcgi.debug = 0
-fastcgi.server = ( ".fcgi" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 10000,
- "bin-path" => env.SRCDIR + "/fcgi-responder",
- "check-local" => "disable",
- "max-procs" => 1,
- "min-procs" => 1
- )
- )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-
-
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+fastcgi.debug = 0
+fastcgi.server = (
+ ".fcgi" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 10000,
+ "bin-path" => env.SRCDIR + "/fcgi-responder",
+ "check-local" => "disable",
+ "max-procs" => 1,
+ "min-procs" => 1,
+ ),
+ ),
+)
+
+cgi.assign = (
+ ".pl" => env.PERL,
+ ".cgi" => env.PERL,
+)
auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
@@ -116,59 +95,59 @@ auth.backend.ldap.hostname = "localhost"
auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
auth.backend.ldap.filter = "(uid=$)"
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
-
-expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/auth.php" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "user=jan",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+)
+
+expire.url = (
+ "/buggy/" => "access 2 hours",
+ "/asdhas/" => "access plus 1 seconds 2 minutes",
+)
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
}
$HTTP["host"] == "wsgi.example.org" {
fastcgi.server = (
- "/" =>
- ( (
- "host" => "127.0.0.1", "port" => 10000,
- "fix-root-scriptname" => "enable",
- "check-local" => "disable",
- "bin-path" => env.SRCDIR + "/fcgi-responder",
- "max-procs" => 1,
- ) ),
+ "/" => ( (
+ "host" => "127.0.0.1", "port" => 10000,
+ "fix-root-scriptname" => "enable",
+ "check-local" => "disable",
+ "bin-path" => env.SRCDIR + "/fcgi-responder",
+ "max-procs" => 1,
+ ) ),
)
}
diff --git a/tests/lighttpd.conf b/tests/lighttpd.conf
index a140002e..83eee0e5 100644
--- a/tests/lighttpd.conf
+++ b/tests/lighttpd.conf
@@ -19,220 +19,261 @@ server.tag = "Apache 1.3.29"
server.dir-listing = "enable"
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_setenv",
- "mod_secdownload",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
- "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_cgi",
- "mod_compress",
- "mod_userdir",
- "mod_ssi",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.php", "index.html",
- "index.htm", "default.htm" )
-
+server.modules = (
+ "mod_rewrite",
+ "mod_setenv",
+ "mod_secdownload",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_simple_vhost",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_cgi",
+ "mod_compress",
+ "mod_userdir",
+ "mod_ssi",
+ "mod_accesslog",
+)
+
+server.indexfiles = (
+ "index.php",
+ "index.html",
+ "index.htm",
+ "default.htm",
+)
######################## MODULE CONFIG ############################
-ssi.extension = ( ".shtml" )
-
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
+ssi.extension = (
+ ".shtml",
+)
+
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
$HTTP["host"] == "cache.example.org" {
- compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+ compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
}
-compress.filetype = ("text/plain", "text/html")
-
-setenv.add-environment = ( "TRAC_ENV" => "tracenv", "SETENV" => "setenv")
-setenv.add-request-header = ( "FOO" => "foo")
-setenv.add-response-header = ( "BAR" => "foo")
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+setenv.add-environment = (
+ "TRAC_ENV" => "tracenv",
+ "SETENV" => "setenv",
+)
+setenv.add-request-header = (
+ "FOO" => "foo",
+)
+setenv.add-response-header = (
+ "BAR" => "foo",
+)
$HTTP["url"] =~ "\.pdf$" {
- server.range-requests = "disable"
+ server.range-requests = "disable"
}
-fastcgi.debug = 0
-fastcgi.server = ( ".php" => ( ( "host" => "127.0.0.1", "port" => 1026, "broken-scriptfilename" => "enable", "allow-x-send-file" => "enable" ) ),
- "/prefix.fcgi" => ( ( "host" => "127.0.0.1", "port" => 1026, "check-local" => "disable", "broken-scriptfilename" => "enable" ) )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-userdir.include-user = ( "jan" )
+fastcgi.debug = 0
+fastcgi.server = (
+ ".php" => ( (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ "broken-scriptfilename" => "enable",
+ "allow-x-send-file" => "enable",
+ ) ),
+ "/prefix.fcgi" => ( (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ "check-local" => "disable",
+ "broken-scriptfilename" => "enable",
+ ) ),
+)
+
+cgi.assign = (
+ ".pl" => env.PERL,
+ ".cgi" => env.PERL,
+)
+
+userdir.include-user = (
+ "jan",
+)
userdir.path = "/"
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
-
$HTTP["host"] == "auth-htpasswd.example.org" {
- auth.backend = "htpasswd"
+ auth.backend = "htpasswd"
}
-auth.backend = "plain"
+auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
-
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
- "require" => "valid-user"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.rewrite = ( "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
- "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1" )
-
-url.rewrite-if-not-file = ( "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2" )
-
-expire.url = ( "/expire/access" => "access 2 hours",
- "/expire/modification" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "valid-user",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.rewrite = (
+ "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
+ "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
+)
+
+url.rewrite-if-not-file = (
+ "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2",
+)
+
+expire.url = (
+ "/expire/access" => "access 2 hours",
+ "/expire/modification" => "access plus 1 seconds 2 minutes",
+)
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- secdownload.secret = "verysecret"
- secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- secdownload.uri-prefix = "/sec/"
- secdownload.timeout = 120
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ secdownload.secret = "verysecret"
+ secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ secdownload.uri-prefix = "/sec/"
+ secdownload.timeout = 120
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
- static-file.disable-pathinfo = "enable"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
+ static-file.disable-pathinfo = "enable"
}
$HTTP["host"] == "symlink.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "symlink.example.org"
- server.follow-symlink = "enable"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "symlink.example.org"
+ server.follow-symlink = "enable"
}
$HTTP["host"] == "nosymlink.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "symlink.example.org"
- server.follow-symlink = "disable"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "symlink.example.org"
+ server.follow-symlink = "disable"
}
$HTTP["host"] == "no-simple.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
+ server.name = "zzz.example.org"
}
$HTTP["host"] !~ "(no-simple\.example\.org)" {
- simple-vhost.document-root = "pages"
- simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
- simple-vhost.default-host = "www.example.org"
+ simple-vhost.document-root = "pages"
+ simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
+ simple-vhost.default-host = "www.example.org"
}
$HTTP["host"] == "auth.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "auth.example.org"
- auth.backend = "htpasswd"
- auth.require = ( "" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
- "require" => "valid-user"
- )
- )
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "auth.example.org"
+ auth.backend = "htpasswd"
+ auth.require = (
+ "" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "valid-user",
+ ),
+ )
}
$HTTP["host"] =~ "(vvv).example.org" {
- url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
+ url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+ )
}
$HTTP["host"] =~ "(zzz).example.org" {
- url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" )
+ url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/%1",
+ )
}
$HTTP["host"] =~ "(remoteip)\.example\.org" {
- $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
- url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" )
- }
+ $HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
+ url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/%1",
+ )
+ }
}
$HTTP["remoteip"] =~ "(127\.0\.0\.1)" {
- $HTTP["host"] =~ "(remoteip2)\.example\.org" {
- url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" )
- }
+ $HTTP["host"] =~ "(remoteip2)\.example\.org" {
+ url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/%1",
+ )
+ }
}
$HTTP["host"] =~ "bug255\.example\.org$" {
- $HTTP["remoteip"] == "127.0.0.1" {
- url.access-deny = ( "" )
- }
+ $HTTP["remoteip"] == "127.0.0.1" {
+ url.access-deny = (
+ "",
+ )
+ }
}
$HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
- url.access-deny = ( ".jpg" )
+ url.access-deny = (
+ ".jpg",
+ )
}
# deny access for all image stealers
$HTTP["host"] == "referer.example.org" {
- $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
- url.access-deny = ( ".png" )
- }
+ $HTTP["referer"] !~ "^($|http://referer\.example\.org)" {
+ url.access-deny = (
+ ".png",
+ )
+ }
}
$HTTP["cookie"] =~ "empty-ref" {
- $HTTP["referer"] == "" {
- url.access-deny = ( "" )
- }
+ $HTTP["referer"] == "" {
+ url.access-deny = (
+ "",
+ )
+ }
}
-
$HTTP["host"] == "etag.example.org" {
- static-file.etags = "disable"
- compress.filetype = ()
+ static-file.etags = "disable"
+ compress.filetype = ()
}
diff --git a/tests/lowercase.conf b/tests/lowercase.conf
index b66980d3..4ca73c19 100644
--- a/tests/lowercase.conf
+++ b/tests/lowercase.conf
@@ -12,69 +12,90 @@ server.force-lowercase-filenames = "enable"
server.dir-listing = "enable"
-server.modules = (
- "mod_rewrite",
- "mod_setenv",
- "mod_secdownload",
- "mod_access",
- "mod_auth",
- "mod_status",
- "mod_expire",
- "mod_redirect",
- "mod_fastcgi",
- "mod_cgi" )
-
-server.indexfiles = ( "index.php", "index.html",
- "index.htm", "default.htm" )
+server.modules = (
+ "mod_rewrite",
+ "mod_setenv",
+ "mod_secdownload",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_cgi",
+)
+
+server.indexfiles = (
+ "index.php",
+ "index.html",
+ "index.htm",
+ "default.htm",
+)
######################## MODULE CONFIG ############################
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-fastcgi.debug = 0
-fastcgi.server = ( ".php" => ( ( "host" => "127.0.0.1", "port" => 1026, "broken-scriptfilename" => "enable" ) ),
- "/prefix.fcgi" => ( ( "host" => "127.0.0.1", "port" => 1026, "check-local" => "disable", "broken-scriptfilename" => "enable" ) )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-auth.backend = "plain"
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+fastcgi.debug = 0
+fastcgi.server = (
+ ".php" => ( (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ "broken-scriptfilename" => "enable",
+ ) ),
+ "/prefix.fcgi" => ( (
+ "host" => "127.0.0.1",
+ "port" => 1026,
+ "check-local" => "disable",
+ "broken-scriptfilename" => "enable",
+ ) ),
+)
+
+cgi.assign = (
+ ".pl" => env.PERL,
+ ".cgi" => env.PERL,
+)
+
+auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd"
$HTTP["host"] == "lowercase-auth" {
- auth.require = ( "/image.jpg" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
- "require" => "valid-user"
- )
- )
+ auth.require = (
+ "/image.jpg" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "valid-user",
+ ),
+ )
}
$HTTP["host"] == "lowercase-deny" {
- url.access-deny = ( ".jpg")
+ url.access-deny = (
+ ".jpg",
+ )
}
$HTTP["host"] == "lowercase-exclude" {
- static-file.exclude-extensions = ( ".jpg" )
+ static-file.exclude-extensions = (
+ ".jpg",
+ )
}
diff --git a/tests/mod-compress.conf b/tests/mod-compress.conf
index b7c3f2cb..f3c3536e 100644
--- a/tests/mod-compress.conf
+++ b/tests/mod-compress.conf
@@ -15,7 +15,7 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.name = "www.example.org"
server.modules = (
- "mod_compress"
+ "mod_compress",
)
######################## MODULE CONFIG ############################
@@ -28,6 +28,12 @@ mimetype.assign = (
$HTTP["host"] == "cache.example.org" {
compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
}
-compress.filetype = ("text/plain", "text/html")
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
-compress.allowed-encodings = ( "gzip", "deflate" )
+compress.allowed-encodings = (
+ "gzip",
+ "deflate",
+)
diff --git a/tests/mod-extforward.conf b/tests/mod-extforward.conf
index df692ce2..673ff689 100644
--- a/tests/mod-extforward.conf
+++ b/tests/mod-extforward.conf
@@ -16,14 +16,18 @@ server.tag = "Apache 1.3.29"
server.modules = (
"mod_cgi",
- "mod_extforward"
+ "mod_extforward",
)
######################## MODULE CONFIG ############################
-mimetype.assign = ( ".html" => "text/html" )
+mimetype.assign = (
+ ".html" => "text/html",
+)
-cgi.assign = (".pl" => "/usr/bin/perl" )
+cgi.assign = (
+ ".pl" => env.PERL,
+)
extforward.forwarder = (
"127.0.0.1" => "trust",
diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t
index 691bce2e..b3680d0d 100755
--- a/tests/mod-fastcgi.t
+++ b/tests/mod-fastcgi.t
@@ -15,13 +15,10 @@ my $tf = LightyTest->new();
my $t;
my $php_child = -1;
-my $phpbin = (defined $ENV{'PHP'} ? $ENV{'PHP'} : '/usr/bin/php-cgi');
-$ENV{'PHP'} = $phpbin;
-
SKIP: {
skip "PHP already running on port 1026", 1 if $tf->listening_on(1026);
- skip "no php binary found", 1 unless -x $phpbin;
- ok(-1 != ($php_child = $tf->spawnfcgi($phpbin, 1026)), "Spawning php");
+ skip "no php binary found", 1 unless $LightyTest::HAVE_PHP;
+ ok(-1 != ($php_child = $tf->spawnfcgi($ENV{'PHP'}, 1026)), "Spawning php");
}
SKIP: {
@@ -295,7 +292,7 @@ EOF
}
SKIP: {
- skip "no php found", 5 unless -x $phpbin;
+ skip "no php found", 5 unless $LightyTest::HAVE_PHP;
$tf->{CONFIGFILE} = 'fastcgi-13.conf';
ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die();
$t->{REQUEST} = ( <<EOF
diff --git a/tests/mod-proxy.t b/tests/mod-proxy.t
index 13690a4d..2362489b 100755
--- a/tests/mod-proxy.t
+++ b/tests/mod-proxy.t
@@ -17,13 +17,10 @@ my $tf_proxy = LightyTest->new();
my $t;
my $php_child = -1;
-my $phpbin = (defined $ENV{'PHP'} ? $ENV{'PHP'} : '/usr/bin/php-cgi');
-$ENV{'PHP'} = $phpbin;
-
SKIP: {
skip "PHP already running on port 1026", 1 if $tf_real->listening_on(1026);
- skip "no php binary found", 1 unless -x $phpbin;
- ok(-1 != ($php_child = $tf_real->spawnfcgi($phpbin, 1026)), "Spawning php");
+ skip "no php binary found", 1 unless $LightyTest::HAVE_PHP;
+ ok(-1 != ($php_child = $tf_real->spawnfcgi($ENV{'PHP'}, 1026)), "Spawning php");
}
## we need two procs
diff --git a/tests/mod-rewrite.t b/tests/mod-rewrite.t
index 6474f19f..615ac7be 100755
--- a/tests/mod-rewrite.t
+++ b/tests/mod-rewrite.t
@@ -15,12 +15,10 @@ my $tf = LightyTest->new();
my $t;
my $php_child = -1;
-my $phpbin = (defined $ENV{'PHP'} ? $ENV{'PHP'} : '/usr/bin/php-cgi');
-
SKIP: {
skip "PHP already running on port 1026", 1 if $tf->listening_on(1026);
- skip "no php binary found", 1 unless -x $phpbin;
- ok(-1 != ($php_child = $tf->spawnfcgi($phpbin, 1026)), "Spawning php");
+ skip "no php binary found", 1 unless $LightyTest::HAVE_PHP;
+ ok(-1 != ($php_child = $tf->spawnfcgi($ENV{'PHP'}, 1026)), "Spawning php");
}
SKIP: {
diff --git a/tests/mod-simplevhost.conf b/tests/mod-simplevhost.conf
index 816acf5d..533fe3b9 100644
--- a/tests/mod-simplevhost.conf
+++ b/tests/mod-simplevhost.conf
@@ -18,12 +18,13 @@ server.port = 2048
######################## MODULE CONFIG ############################
-server.modules = ( "mod_simple_vhost" )
-
+server.modules = (
+ "mod_simple_vhost",
+)
# docroot depending on request path
$HTTP["url"] =~ "^/a/" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/a.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/a.example.org/pages/"
} else $HTTP["url"] =~ "^/b/" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/b.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/b.example.org/pages/"
}
diff --git a/tests/proxy.conf b/tests/proxy.conf
index 2e959acc..107a574f 100644
--- a/tests/proxy.conf
+++ b/tests/proxy.conf
@@ -10,84 +10,89 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage.
server.name = "www.example.org"
server.tag = "Proxy"
-server.dir-listing = "enable"
-
-#server.event-handler = "linux-sysepoll"
-#server.event-handler = "linux-rtsig"
-
-#server.modules.path = ""
-server.modules = (
- "mod_rewrite",
- "mod_setenv",
- "mod_access",
- "mod_auth",
-# "mod_httptls",
- "mod_status",
- "mod_expire",
- "mod_simple_vhost",
- "mod_redirect",
-# "mod_evhost",
-# "mod_localizer",
- "mod_fastcgi",
- "mod_proxy",
- "mod_cgi",
- "mod_compress",
- "mod_userdir",
- "mod_accesslog" )
-
-server.indexfiles = ( "index.php", "index.html",
- "index.htm", "default.htm" )
-
+server.dir-listing = "enable"
+
+server.modules = (
+ "mod_rewrite",
+ "mod_setenv",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
+ "mod_expire",
+ "mod_simple_vhost",
+ "mod_redirect",
+ "mod_fastcgi",
+ "mod_proxy",
+ "mod_cgi",
+ "mod_compress",
+ "mod_userdir",
+ "mod_accesslog",
+)
+
+server.indexfiles = (
+ "index.php",
+ "index.html",
+ "index.htm",
+ "default.htm",
+)
######################## MODULE CONFIG ############################
-
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-
-mimetype.assign = ( ".png" => "image/png",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".gif" => "image/gif",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".pdf" => "application/pdf",
- ".swf" => "application/x-shockwave-flash",
- ".spl" => "application/futuresplash",
- ".txt" => "text/plain",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
- ".c" => "text/plain",
- ".conf" => "text/plain" )
-
-compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
-compress.filetype = ("text/plain", "text/html")
-
-setenv.add-environment = ( "TRAC_ENV" => "foo")
-setenv.add-request-header = ( "FOO" => "foo")
-setenv.add-response-header = ( "BAR" => "foo")
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+
+mimetype.assign = (
+ ".png" => "image/png",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".gif" => "image/gif",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".pdf" => "application/pdf",
+ ".swf" => "application/x-shockwave-flash",
+ ".spl" => "application/futuresplash",
+ ".txt" => "text/plain",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".gz" => "application/x-gzip",
+ ".c" => "text/plain",
+ ".conf" => "text/plain",
+)
+
+compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
+compress.filetype = (
+ "text/plain",
+ "text/html",
+)
+
+setenv.add-environment = (
+ "TRAC_ENV" => "foo",
+)
+setenv.add-request-header = (
+ "FOO" => "foo",
+)
+setenv.add-response-header = (
+ "BAR" => "foo",
+)
proxy.debug = 1
-proxy.server = ( "" => (
- "grisu" => (
- "host" => "127.0.0.1",
- "port" => 2048,
- )
- )
- )
-
-
-cgi.assign = ( ".pl" => "/usr/bin/perl",
- ".cgi" => "/usr/bin/perl",
- ".py" => "/usr/bin/python" )
-
-userdir.include-user = ( "jan" )
+proxy.server = ( "" => (
+ "grisu" => (
+ "host" => "127.0.0.1",
+ "port" => 2048,
+ ),
+))
+
+cgi.assign = (
+ ".pl" => env.PERL,
+ ".cgi" => env.PERL,
+)
+
+userdir.include-user = (
+ "jan",
+)
userdir.path = "/"
-ssl.engine = "disable"
-# ssl.pemfile = "server.pem"
-
-auth.backend = "plain"
+auth.backend = "plain"
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
@@ -95,63 +100,64 @@ auth.backend.ldap.hostname = "localhost"
auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
auth.backend.ldap.filter = "(uid=$)"
-auth.require = ( "/server-status" =>
- (
- "method" => "digest",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- ),
- "/auth.php" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "host=192.168.2.10")
- "require" => "user=jan"
- ),
- "/server-config" =>
- (
- "method" => "basic",
- "realm" => "download archiv",
-# "require" => ("group=www", "user=jan", "user=weigon", "host=192.168.2.10")
- "require" => "group=www|user=jan|host=192.168.2.10"
- )
- )
-
-url.access-deny = ( "~", ".inc")
-
-url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
-
-url.rewrite = ( "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
- "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
- "^/rewrite/all(/.*)$" => "/indexfile/rewrite.php?$1" )
-
-expire.url = ( "/expire/access" => "access 2 hours",
- "/expire/modification" => "access plus 1 seconds 2 minutes")
-
-#cache.cache-dir = "/home/weigon/wwwroot/cache/"
+auth.require = (
+ "/server-status" => (
+ "method" => "digest",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+ "/auth.php" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "user=jan",
+ ),
+ "/server-config" => (
+ "method" => "basic",
+ "realm" => "download archiv",
+ "require" => "group=www|user=jan|host=192.168.2.10",
+ ),
+)
+
+url.access-deny = (
+ "~",
+ ".inc",
+)
+
+url.redirect = (
+ "^/redirect/$" => "http://localhost:2048/",
+)
+
+url.rewrite = (
+ "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
+ "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
+ "^/rewrite/all(/.*)$" => "/indexfile/rewrite.php?$1",
+)
+
+expire.url = (
+ "/expire/access" => "access 2 hours",
+ "/expire/modification" => "access plus 1 seconds 2 minutes",
+)
#### status module
-status.status-url = "/server-status"
-status.config-url = "/server-config"
+status.status-url = "/server-status"
+status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "zzz.example.org"
}
$HTTP["host"] == "no-simple.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
- server.name = "zzz.example.org"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/"
+ server.name = "zzz.example.org"
}
$HTTP["host"] !~ "(no-simple\.example\.org)" {
- simple-vhost.document-root = "pages"
- simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
- simple-vhost.default-host = "www.example.org"
+ simple-vhost.document-root = "pages"
+ simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/"
+ simple-vhost.default-host = "www.example.org"
}
-
diff --git a/tests/var-include-sub.conf b/tests/var-include-sub.conf
index 3e0c3b9c..d8f16969 100644
--- a/tests/var-include-sub.conf
+++ b/tests/var-include-sub.conf
@@ -1,34 +1,38 @@
# file to be included
$HTTP["host"] =~ "^" + server.name + "$" {
url.redirect = (
- "^/include$" => "/good_include",
- "^/concat$" => "/good_" + "concat",
- "^/servername1$" => "/good_" + server.name,
- "^/servername2$" => server.name + "/good_",
- "^/servername3$" => "/good_" + server.name + "/",
- "^/var.myvar$" => "/good_var_myvar" + var.myvar,
- "^/myvar$" => "/good_myvar" + myvar,
- "^/number1$" => "/good_number" + one,
- "^/number2$" => one + "/good_number",
- "^/env$" => "/" + env.env_test,
- )
+ "^/include$" => "/good_include",
+ "^/concat$" => "/good_" + "concat",
+ "^/servername1$" => "/good_" + server.name,
+ "^/servername2$" => server.name + "/good_",
+ "^/servername3$" => "/good_" + server.name + "/",
+ "^/var.myvar$" => "/good_var_myvar" + var.myvar,
+ "^/myvar$" => "/good_myvar" + myvar,
+ "^/number1$" => "/good_number" + one,
+ "^/number2$" => one + "/good_number",
+ "^/env$" => "/" + env.env_test,
+ )
+
num = 1
num2 = 2
num2 += 1
+
# without var prefix
mystr = "string"
mystr += "_append"
+
# from parent
one += 1
+
url.redirect += (
- "^/array_append$" => "/good_array_append",
- "^/string_append$" => "/good_" + mystr,
- "^/number_append$" => "/good_" + one,
- )
+ "^/array_append$" => "/good_array_append",
+ "^/string_append$" => "/good_" + mystr,
+ "^/number_append$" => "/good_" + one,
+ )
cmd = "echo cmd_ok=456"
include_shell cmd
url.redirect += (
- "^/include_shell$" => "/good_include_shell_" + cmd_ok,
- )
+ "^/include_shell$" => "/good_include_shell_" + cmd_ok,
+ )
}
diff --git a/tests/var-include.conf b/tests/var-include.conf
index 6a107c55..35c42fe7 100644
--- a/tests/var-include.conf
+++ b/tests/var-include.conf
@@ -15,27 +15,35 @@ server.name = "www.example.org"
server.tag = "Apache 1.3.29"
-server.modules = ( "mod_redirect",
- "mod_accesslog" )
+server.modules = (
+ "mod_redirect",
+ "mod_accesslog",
+)
######################## MODULE CONFIG ############################
+accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
-accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log"
+mimetype.assign = (
+ ".html" => "text/html",
+)
-mimetype.assign = ( ".html" => "text/html" )
-
-url.redirect = ("^" => "/default")
+url.redirect = (
+ "^" => "/default",
+)
$HTTP["host"] == "www.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "www.example.org"
- url.redirect = ("^" => "/redirect")
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "www.example.org"
+ url.redirect = (
+ "^" => "/redirect",
+ )
}
+
$HTTP["host"] == "test.example.org" {
- server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
- server.name = "test.example.org"
- var.myvar = "good"
- var.one = 1
- include "var-include-sub.conf"
+ server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
+ server.name = "test.example.org"
+ var.myvar = "good"
+ var.one = 1
+ include "var-include-sub.conf"
}