# # Configuration file for March 22 2002 demonstrations of mod_perl # # This file is included into Apache's configuration # from /home/httpd/conf/includes/mod_perl.conf # # Since these modules and definitions are included within httpd # when it starts up, changes here or in any of these modules # only take effect when the browser is restarted, i.e. # /home/httpd/bin/apachectl stop # /home/httpd/bin/apachectl startssl # # Or just # /home/httpd/bin/apachectl start # if you're not running SSL (eg https://...) # # And yes, there is a "restart" option, but I've found that explicitly # stopping and starting is more dependable. Sometimes the "restart" # option seems to leave the old versions still hanging round, I think. # ######################################################## # --------------------------------------------- # Example 1, HelloWorld from Writing Apache Modules, chap 2 # Handler source is at /home/httpd/perl_modules/Mar22/Hello.pm # or http://bob.marlboro.edu/~msie/2002/ipl/perl/lectures/mar22/Hello.pm_html # Point your browser at http://bob.marlboro.edu/hello/world # to see it run SetHandler perl-script PerlHandler Mar22::Hello PerlSetVar JimsMagicWord Shazam PerlSetEnv JimsMagicEnv "Picadilly Circus" # ---------------------------------------- # Example 2: ESSI - Extensible Server Side Includes # a full fledged, more realistic, content handler AddType text/html .ehtml SetHandler perl-script # The next line loads /home/httpd/perl_modules/Apache/ESSI.pm PerlHandler Apache::ESSI PerlSetVar ESSIDefs /home/msie/html/2002/ipl/perl/lectures/mar22/ESSI-defs.pl # ---------------------------------------- # Example 3: specific day access only - a PerlAccessHandler Alias /weekends_only /home/msie/html/2002/ipl/perl/lectures/mar22/somedays_only PerlSetVar ReqDay saturday,sunday PerlAccessHandler Apache::DayLimit # from /home/httpd/perl_modules Alias /fri_only /home/msie/html/2002/ipl/perl/lectures/mar22/somedays_only PerlSetVar ReqDay friday PerlAccessHandler Apache::DayLimit # from /home/httpd/perl_modules # ----------------------------------------- # Other miscellaneous modules. # Point your browser at http://bob.marlboro.edu/sys/VMonitor PerlModule Apache::VMonitor ExtendedStatus On SetHandler perl-script PerlHandler Apache::VMonitor order deny,allow deny from all allow from 10. allow from 12.6. allow from 216.114. use Apache::VMonitor(); $Apache::VMonitor::Config{BLINKING} = 0; # Blinking is evil $Apache::VMonitor::Config{REFRESH} = 0; $Apache::VMonitor::Config{VERBOSE} = 0; $Apache::VMonitor::Config{SYSTEM} = 1; $Apache::VMonitor::Config{APACHE} = 1; $Apache::VMonitor::Config{PROCS} = 1; $Apache::VMonitor::Config{MOUNT} = 1; $Apache::VMonitor::Config{FS_USAGE} = 1; $Apache::VMonitor::Config{NETLOAD} = 1; @Apache::VMonitor::NETDEVS = qw(lo eth0); $Apache::VMonitor::PROC_REGEX = join "\|", qw(httpd mysql squid); # dynamic modification of images, # or how to bring the CPU to its knees... Alias /Mar22Images /home/msie/html/2002/ipl/perl/lectures/mar22/images SetHandler perl-script PerlHandler Apache::Magick