--- /dev/null
+# always assume anything to do with files is from project root
+
+use constant LOG_FILE => '/tmp/gorillanest.log';
+use constant SOCKET_FILE => '/tmp/gorillanest.socket';
+use constant DB_FILE => 'gorillanest.sqlite3'; # sqlite3
+
+use constant TEMPLATE_ROOT => 'template'; # template directory
+use constant GIT_ROOT => 'git'; # git directory (~user/repo)
+
+# If you're using lighttpd, set this to 1
+# This disables SOCKET_FILE and lets the socket handling be externally managed
+use constant BARE_REQUEST => 0;
+
+use constant SOCKET_MAX_CONNECTIONS => 100;
+1;
+++ /dev/null
-# always assume anything to do with files is from project root
-use constant LOG_FILE => '/tmp/gorillanest.log';
-use constant GIT_ROOT => 'git'; # directory containing all browsable $users/$repositories
-use constant DB_FILE => 'gorillanest.sqlite3'; # sqlite3 database file location
-use constant TEMPLATE_ROOT => 'template'; # template directory
-use constant USER_REPOSITORY => qr{^/([a-zA-Z0-9_.]+)(?:/([a-zA-Z0-9_.]+))?}; # $1 = username, $2 = repository fullname
-1;
use Git::Repository;
use lib '.';
+BEGIN { require 'config.default.pl'; }
BEGIN { require 'config.pl'; }
sub info {
try {
open STDERR, '>', LOG_FILE or die LOG_FILE . ": $!";
- my $sock = FCGI::OpenSocket(SOCKET_FILE, 100);
- my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, $sock);
+ my $request = FCGI::Request( \*STDIN, \*STDOUT, \*STDERR, \%ENV, BARE_REQUEST ? 0 : FCGI::OpenSocket(SOCKET_FILE, SOCKET_MAX_CONNECTIONS));
while($request->Accept() >= 0) {
master();
}