#this section for development only PerlPassEnv PWD system "make" if -e "Makefile" and not $My::Make++; Include conf/local.conf PerlRequire conf/local.pl PerlRequire conf/startup.pl PerlWarn On PerlTaintCheck On PassEnv PWD # for (qw(bluefish crayfish)) { # my $host = "$_.fish.net"; # $host = "$_.cshl.org"; # $VirtualHost{$host}->{ServerName} = $host; # $VirtualHost{$host}->{ServerAdmin} = "$_\@fish.net"; # } use Config; $ServerName = $Config{myhostname}.$Config{mydomain}; $Port = 9008; $User = getpwuid($>) || $>; $Group = getgrgid($)) || $); $ServerAdmin = $User; $ServerRoot = $ENV{PWD}; $ServerRoot =~ s:t/?$::; #for 'make test' $DocumentRoot = "$ServerRoot/htdocs"; unshift @INC, "$ServerRoot/lib/perl"; my @doc_root_aliases = map { ["/$_" => $DocumentRoot] } qw{ footer navbar OpenGate ClosedGate weekends humpday blockagent speedlimit authany authanon authtiedbi authzgender authzgender2 ticket patch mime httpequiv logmail logdbi }; push @Alias, [ ["/perl" => "$ServerRoot/perl"], ["/cgi-bin" => "$ServerRoot/perl"], ["/echo" => "$DocumentRoot/files"], @doc_root_aliases, ]; #@AddIcon = ( # [ '/icons/compressed.gif' => qw(.Z .z .gz .tgz .zip) ], # [ '/icons/layout.gif' => qw(.html .shtml .htm .pdf) ], #); =pod =head1 NAME httpd.conf - Apache server configuration file =head1 DESCRIPTION This is the configuration file used to test the scripts and modules for Lincoln and Doug's Apache Module book. =head1 EXAMPLE MODULE CONFIGURATION This section configures the various example modules from the book. =over to apache PerlModule Apache::MIME PerlTypeHandler Apache::MIME TypesConfig conf/mime.types Include conf/ch2.conf Include conf/ch4.conf Include conf/ch6.conf Include conf/ch7.conf Include conf/ch9.conf =back to pod =over 4 =item Apache::Status Configuration =over to apache SetHandler perl-script PerlHandler Apache::Status =back to pod =item Apache::Registry Configuration =over to apache PerlModule Apache::RegistryNG Options +ExecCGI SetHandler perl-script PerlHandler Apache::RegistryNG->handler Options +ExecCGI SetHandler cgi-script =back to pod =back =head1 STANDARD CONFIGURATION =over 4 =item Core Configuration =over to apache Options All ServerType standalone HostnameLookups off LogLevel debug ErrorLog logs/error_log LockFile logs/httpd.lock PidFile logs/httpd.pid ScoreBoardFile logs/apache_runtime_status LockFile logs/accept.lock UseCanonicalName on Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 MaxClients 2 MaxSpareServers 2 StartServers 2 =back to pod =item Log Format Configuration This is copy-n-paste from the example configuration files that ship with Apache. See http://www.apache.org/docs/mod/mod_log_config.html for other options. =over to apache CustomLog logs/access_log common LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent =back to pod =item Directory Indexing =over to apache FancyIndexing On AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip AddIconByType (TXT,/icons/text.gif) text/* AddIconByType (IMG,/icons/image2.gif) image/* AddIconByType (SND,/icons/sound2.gif) audio/* AddIconByType (VID,/icons/movie.gif) video/* AddIcon /icons/binary.gif .bin .exe AddIcon /icons/binhex.gif .hqx AddIcon /icons/tar.gif .tar AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip AddIcon /icons/a.gif .ps .ai .eps AddIcon /icons/layout.gif .html .shtml .htm .pdf AddIcon /icons/text.gif .txt AddIcon /icons/c.gif .c AddIcon /icons/p.gif .pl .py AddIcon /icons/f.gif .for AddIcon /icons/dvi.gif .dvi AddIcon /icons/uuencoded.gif .uu AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl AddIcon /icons/tex.gif .tex AddIcon /icons/bomb.gif core AddIcon /icons/back.gif .. AddIcon /icons/hand.right.gif README AddIcon /icons/folder.gif ^^DIRECTORY^^ AddIcon /icons/blank.gif ^^BLANKICON^^ DefaultIcon /icons/unknown.gif ReadmeName README HeaderName HEADER IndexIgnore .??* *~ *# HEADER* README* RCS =back to pod =back =head1 STANDARD MODULE CONFIGURATION =over 4 =item mod_info =over to apache SetHandler server-info SetHandler server-status PerlModule MySSI AddType text/html .shtml AddHandler server-parsed .shtml =back to pod =back =cut AddEncoding x-compress Z AddEncoding x-gzip gz AddLanguage en .en AddLanguage fr .fr AddLanguage de .de AddLanguage da .da AddLanguage el .el AddLanguage it .it LanguagePriority en fr de BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 __END__ PerlModule Apache::ModuleDoc Apache::ShowRequest SetHandler perl-script PerlHandler Apache::ShowRequest SetHandler perl-script PerlHandler Apache::ModuleDoc