perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbek...@hyperreal.org
Subject cvs commit: modperl-site/guide hardware.html security.html CHANGES all.html browserbugs.html config.html databases.html dbm.html download.html guide-src.tar.gz guide.tar.gz help.html index.html install.html intro.html obvious.html performance.html porting.html scenario.html snippets.html start.html strategy.html warnings.html
Date Mon, 17 May 1999 20:47:46 GMT
sbekman     99/05/17 13:47:45

  Modified:    guide    CHANGES all.html browserbugs.html config.html
                        databases.html dbm.html download.html
                        guide-src.tar.gz guide.tar.gz help.html index.html
                        install.html intro.html obvious.html
                        performance.html porting.html scenario.html
                        snippets.html start.html strategy.html
                        warnings.html
  Added:       guide    hardware.html security.html
  Log:
  * new hardware.pod: added a "Operating System and Hardware Demands"
    (Dean Fitz reviewed it and made lots of fixes!!! Thanks)
  
  * started a new security.pod "Protecting Your Site" to explain
    security hazards and to show some configuration setups and code
    snippets.
  
  * security.pod: explained the Authentication and Authorization terms
  
  * security.pod: "Non authenticated access for internal IPs, but
    authenticated by external IPs" (Eric Cholet)
  
  * scenario.pod: added "HTTP Authentication with 2 servers + proxy"
    (Mark Mills, Russell D. Weiss)
  
  * scenario.pod: added some DSO building notes (Guy K. McArthur)
  
  * porting.pod: added "Generating correct HTTP MIME Headers" as
    suggested by Alex Krohn
  
  * config.pod: added "Running 'apachectl configtest' or 'httpd -t'"
    (Doug)
  
  * porting.pod: added "Passing ENV variables to CGI" (Doug)
  
  * Updated: "Finding the line number the error/warning has been
    triggered at" at porting.pod
  
  * Added the info about ProxyReceiveBufferSize in scenario.pod,
    mod_proxy section. (Rauznitz Balazs)
  
  * added to config.pod: Configuration Security Concerns (Gunther
    Birznieks)
  
  * completely rewrote the start.pod (the English was horrible :(
  
  * updated help.pod with squid help URLs
  
  Revision  Changes    Path
  1.11      +40 -3     modperl-site/guide/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/CHANGES,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CHANGES	1999/05/08 17:46:26	1.10
  +++ CHANGES	1999/05/17 20:47:26	1.11
  @@ -1,5 +1,45 @@
   This is a CHANGES file for mod_perl guide
   
  +05.17.99 ver 1.11
  +
  +* new hardware.pod: added a "Operating System and Hardware Demands"
  +  (Dean Fitz reviewed it and made lots of fixes!!! Thanks)
  +
  +* started a new security.pod "Protecting Your Site" to explain
  +  security hazards and to show some configuration setups and code
  +  snippets.
  +
  +* security.pod: explained the Authentication and Authorization terms
  +
  +* security.pod: "Non authenticated access for internal IPs, but
  +  authenticated by external IPs" (Eric Cholet)
  +
  +* scenario.pod: added "HTTP Authentication with 2 servers + proxy"
  +  (Mark Mills, Russell D. Weiss)
  +
  +* scenario.pod: added some DSO building notes (Guy K. McArthur)
  +
  +* porting.pod: added "Generating correct HTTP MIME Headers" as
  +  suggested by Alex Krohn
  +
  +* config.pod: added "Running 'apachectl configtest' or 'httpd -t'"
  +  (Doug)
  +
  +* porting.pod: added "Passing ENV variables to CGI" (Doug)
  +
  +* Updated: "Finding the line number the error/warning has been
  +  triggered at" at porting.pod
  +
  +* Added the info about ProxyReceiveBufferSize in scenario.pod,
  +  mod_proxy section. (Rauznitz Balazs)
  +
  +* added to config.pod: Configuration Security Concerns (Gunther
  +  Birznieks)
  +
  +* completely rewrote the start.pod (the English was horrible :(
  +
  +* updated help.pod with squid help URLs
  +
   05.08.99 ver 1.10
   
   * control.pod: SUID start-up scripts (Lincoln Stein)
  @@ -56,9 +96,6 @@
     NAME="Description"> and <META NAME="keywords">
   
   * Improved navigation : added Next, Main. Previous links.
  -
  -* Improved navigation : now index.html includes a linked Table Of
  -  Contents of the whole guide, not only the page titles.
   
   * Added another list archive (help.html):
     http://www.geocrawler.com/lists/3/web/182/0/ (Eric Cholet)
  
  
  
  1.12      +1344 -280 modperl-site/guide/all.html
  
  Index: all.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/all.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- all.html	1999/05/08 17:46:26	1.11
  +++ all.html	1999/05/17 20:47:27	1.12
  @@ -30,12 +30,17 @@
   <CENTER><P><B>Deploying mod_perl technology to give a rocket speed
   to your CGI/perl scripts.</B></P></CENTER>
   
  -<CENTER><P><B>Version 1.10
  - May, 8 1999</B></P></CENTER>
  +<CENTER><P><B>Version 1.11
  + May, 17 1999</B></P></CENTER>
    
   <P>
   <HR WIDTH="100%"></P>
   
  +<B>Mirror readers</B>: Make sure you read <A
  +HREF="http://perl.apache.org/guide"> the latest copy</A>.
  +
  +<HR WIDTH="100%"></P>
  +
   <H3>Table of Contents:</H3>
   
   <UL>
  @@ -44,7 +49,7 @@
   <UL>
   
   	<LI><A HREF="intro.html#What_is_mod_perl">What is mod_perl</A>
  -	<LI><A HREF="intro.html#What_is_covered_in_this_document">What is covered in this document</A>
  +	<LI><A HREF="intro.html#What_will_you_learn">What will you learn</A>
   	<LI><A HREF="intro.html#References_and_Acknowledgments">References and Acknowledgments</A>
   </UL>
   <P><LI><A HREF="start.html"><B><FONT SIZE=+1>Guide's Overview</FONT></B></A></LI><P>
  @@ -57,14 +62,14 @@
   
   	<LI><A HREF="strategy.html#Do_it_like_me_">Do it like me?!</A>
   	<LI><A HREF="strategy.html#mod_perl_Deploying_Schemas_Overv">mod_perl Deploying Schemas Overview</A>
  -	<LI><A HREF="strategy.html#Stand_alone_mod_perl_Enabled_Apa">Stand alone mod_perl Enabled Apache Server</A>
  +	<LI><A HREF="strategy.html#Standalone_mod_perl_Enabled_Apac">Standalone mod_perl Enabled Apache Server</A>
   	<LI><A HREF="strategy.html#One_Plain_and_One_mod_perl_enabl">One Plain and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="strategy.html#One_light_non_Apache_and_One_mod">One light non-Apache and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="strategy.html#Adding_a_Proxy_Server_in_http_Ac">Adding a Proxy Server in http Accelerator Mode</A>
   	<LI><A HREF="strategy.html#squid_server">squid server</A>
   	<LI><A HREF="strategy.html#apache_s_mod_proxy">apache's mod_proxy</A>
   </UL>
  -<P><LI><A HREF="scenario.html"><B><FONT SIZE=+1>Real World Scenarios of Implementing Various Strategies</FONT></B></A></LI><P>
  +<P><LI><A HREF="scenario.html"><B><FONT SIZE=+1>Real World Scenarios Implementaion</FONT></B></A></LI><P>
   <UL>
   
   	<LI><A HREF="scenario.html#Before_you_dive_into_the_gory_de">Before you dive into the gory details</A>
  @@ -91,6 +96,7 @@
   	<LI><A HREF="scenario.html#Running_1_webserver_and_squid_in">Running 1 webserver and squid in httpd accelerator mode</A>
   	<LI><A HREF="scenario.html#Using_mod_proxy">Using mod_proxy</A>
   	<LI><A HREF="scenario.html#mod_perl_server_as_DSO">mod_perl server as DSO</A>
  +	<LI><A HREF="scenario.html#HTTP_Authentication_with_2_serve">HTTP Authentication with 2 servers + proxy</A>
   </UL>
   <P><LI><A HREF="install.html"><B><FONT SIZE=+1>Installation Notes</FONT></B></A></LI><P>
   <UL>
  @@ -115,7 +121,7 @@
   
   	<LI><A HREF="install.html#Is_it_possible_to_install_and_us">Is it possible to install and use apache/mod_perl without having a root access?</A>
   	<LI><A HREF="install.html#Is_it_possible_to_determine_whic">Is it possible to determine which options were given to modperl's Makefile.PL</A>
  -	<LI><A HREF="install.html#Server_Installation">Server Installation</A>
  +	<LI><A HREF="install.html#Server_Installation_problems">Server Installation problems</A>
   	<UL>
   
   		<LI><A HREF="install.html#make_test_fails">make test fails</A>
  @@ -132,6 +138,7 @@
   		<LI><A HREF="config.html#Location_Configuration">Location Configuration</A>
   		<LI><A HREF="config.html#PerlFreshRestart">PerlFreshRestart</A>
   		<LI><A HREF="config.html#_perl_status_location">/perl-status location</A>
  +		<LI><A HREF="config.html#PerlSetVar_PerlSetEnv_and_PerlP">PerlSetVar, PerlSetEnv and PerlPassEnv</A>
   		<LI><A HREF="config.html#perl_startup_file">perl-startup file</A>
   		<UL>
   
  @@ -142,6 +149,7 @@
   
   	</UL>
   
  +	<LI><A HREF="config.html#Running_apachectl_configtest_o">Running 'apachectl configtest' or 'httpd -t'</A>
   	<LI><A HREF="config.html#Perl_behavior_controls">Perl behavior controls</A>
   	<LI><A HREF="config.html#Tuning_MinSpareServers_MaxSpareS">Tuning MinSpareServers MaxSpareServers StartServers MaxClients</A>
   	<LI><A HREF="config.html#Publishing_port_numbers_differen">Publishing port numbers different from 80</A>
  @@ -158,6 +166,7 @@
   		<LI><A HREF="config.html#the_server_no_longer_retrieves_t">the server no longer retrieves the DirectoryIndex files for a directory</A>
   	</UL>
   
  +	<LI><A HREF="config.html#Configuration_Security_Concerns">Configuration Security Concerns</A>
   </UL>
   <P><LI><A HREF="frequent.html"><B><FONT SIZE=+1>Frequent mod_perl problems</FONT></B></A></LI><P>
   <UL>
  @@ -200,6 +209,7 @@
   		<LI><A HREF="porting.html#Memory_leakage">Memory leakage</A>
   	</UL>
   
  +	<LI><A HREF="porting.html#Passing_ENV_variables_to_CGI">Passing ENV variables to CGI</A>
   	<LI><A HREF="porting.html#Filehandlers_and_locks_leakages">Filehandlers and locks leakages</A>
   	<UL>
   
  @@ -211,6 +221,7 @@
   	<LI><A HREF="porting.html#Redirecting_Errors_to_Client_ins">Redirecting Errors to Client instead of error_log</A>
   	<LI><A HREF="porting.html#Finding_the_line_number_the_erro">Finding the line number the error/warning has been triggered at</A>
   	<LI><A HREF="porting.html#Forking_subprocesses_from_mod_pe">Forking subprocesses from mod_perl</A>
  +	<LI><A HREF="porting.html#Generating_correct_HTTP_MIME_Hea">Generating correct HTTP MIME Headers</A>
   </UL>
   <P><LI><A HREF="performance.html"><B><FONT SIZE=+1>Performance. Benchmarks.</FONT></B></A></LI><P>
   <UL>
  @@ -255,6 +266,35 @@
   	<LI><A HREF="performance.html#Profiling">Profiling</A>
   	<LI><A HREF="performance.html#CGI_pm_s_object_methods_calls_vs">CGI.pm's object methods calls vs. function calls</A>
   </UL>
  +<P><LI><A HREF="hardware.html"><B><FONT SIZE=+1>Choosing an Operating System and a Hardware</FONT></B></A></LI><P>
  +<UL>
  +
  +	<LI><A HREF="hardware.html#Is_it_important_">Is it important?</A>
  +	<LI><A HREF="hardware.html#Operating_System_Choosing">Operating System Choosing</A>
  +	<UL>
  +
  +		<LI><A HREF="hardware.html#Stability_and_Robustness">Stability and Robustness</A>
  +		<LI><A HREF="hardware.html#Memory_Management">Memory Management</A>
  +		<LI><A HREF="hardware.html#Memory_Leakages">Memory Leakages</A>
  +		<LI><A HREF="hardware.html#Sharing_Memory">Sharing Memory</A>
  +		<LI><A HREF="hardware.html#Cost_and_Support">Cost and Support</A>
  +		<LI><A HREF="hardware.html#Discontinued_products">Discontinued products</A>
  +		<LI><A HREF="hardware.html#OS_Releases">OS Releases</A>
  +	</UL>
  +
  +	<LI><A HREF="hardware.html#Hardware_Choosing">Hardware Choosing</A>
  +	<UL>
  +
  +		<LI><A HREF="hardware.html#Site_s_traffic">Site's traffic</A>
  +		<LI><A HREF="hardware.html#Cash">Cash</A>
  +		<LI><A HREF="hardware.html#IO_performance">IO performance</A>
  +		<LI><A HREF="hardware.html#Memory">Memory</A>
  +		<LI><A HREF="hardware.html#Internet_Connection">Internet Connection</A>
  +		<LI><A HREF="hardware.html#Bottlenecks">Bottlenecks</A>
  +		<LI><A HREF="hardware.html#Conclusion">Conclusion</A>
  +	</UL>
  +
  +</UL>
   <P><LI><A HREF="obvious.html"><B><FONT SIZE=+1>Things obvious to others, but not to you</FONT></B></A></LI><P>
   <UL>
   
  @@ -306,6 +346,17 @@
   	<LI><A HREF="warnings.html#Evil_things_might_happen_when_us">Evil things might happen when using PerlFreshRestart</A>
   	<LI><A HREF="warnings.html#server_reached_MaxClients_settin">server reached MaxClients setting, consider raising the MaxClients setting</A>
   </UL>
  +<P><LI><A HREF="security.html"><B><FONT SIZE=+1>Protecting Your Site</FONT></B></A></LI><P>
  +<UL>
  +
  +	<LI><A HREF="security.html#An_Importance_of_Your_site_s_Sec">An Importance of Your site's Security</A>
  +	<LI><A HREF="security.html#Illustrated_security_scenarios">Illustrated security scenarios</A>
  +	<UL>
  +
  +		<LI><A HREF="security.html#Non_authenticated_access_for_int">Non authenticated access for internal IPs, but authenticated by external IPs</A>
  +	</UL>
  +
  +</UL>
   <P><LI><A HREF="databases.html"><B><FONT SIZE=+1>mod_perl and Relational Databases</FONT></B></A></LI><P>
   <UL>
   
  @@ -389,7 +440,7 @@
   <P><LI><A HREF="browserbugs.html"><B><FONT SIZE=+1>Workarounds for some known bugs in browsers.</FONT></B></A></LI><P>
   <UL>
   
  -	<LI><A HREF="browserbugs.html#Preventing_QUERY_STRING_to_get_c">Preventing QUERY_STRING to get corrupted with &amp;entity key names.</A>
  +	<LI><A HREF="browserbugs.html#Preventing_QUERY_STRING_from_get">Preventing QUERY_STRING from getting corrupted because of &amp;entity key names.</A>
   	<LI><A HREF="browserbugs.html#IE_4_x_does_not_re_post_data_to_">IE 4.x does not re-post data to a non-port-80 URL</A>
   </UL>
   <P><LI><A HREF="modules.html"><B><FONT SIZE=+1>Apache::* modules</FONT></B></A></LI><P>
  @@ -434,6 +485,7 @@
   	<LI><A HREF="help.html#Get_helped_with_Perl_CGI">Get helped with Perl/CGI</A>
   	<LI><A HREF="help.html#Get_helped_with_Apache">Get helped with Apache </A>
   	<LI><A HREF="help.html#Get_helped_with_DBI">Get helped with DBI</A>
  +	<LI><A HREF="help.html#Get_helped_with_Squid_Internet">Get helped with Squid - Internet Object Cache</A>
   </UL>
   <P><LI><A HREF="download.html"><B><FONT SIZE=+1>Appendix A: Downloading software and documentation</FONT></B></A></LI><P>
   <UL>
  @@ -442,8 +494,8 @@
   	<LI><A HREF="download.html#perl">perl</A>
   	<LI><A HREF="download.html#apache">apache</A>
   	<LI><A HREF="download.html#mod_perl">mod_perl</A>
  -	<LI><A HREF="download.html#Squid">Squid</A>
  -	<LI><A HREF="download.html#thttpd">thttpd</A>
  +	<LI><A HREF="download.html#Squid_Internet_Object_Cache">Squid - Internet Object Cache</A>
  +	<LI><A HREF="download.html#thttpd_tiny_turbo_throttling_H">thttpd - tiny/turbo/throttling HTTP server</A>
   	<LI><A HREF="download.html#mod_proxy_add_forward">mod_proxy_add_forward</A>
   </UL>
   <P>
  @@ -503,7 +555,7 @@
   <TR ALIGN=CENTER VALIGN=TOP>
   
   <TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A
  -HREF="help.html#This_document_s_Author">Stas Bekman</A>.<BR> Last Modified at 05/08/1999
  +HREF="help.html#This_document_s_Author">Stas Bekman</A>.<BR> Last Modified at 05/17/1999
   </FONT></B></TD>
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
  @@ -553,7 +605,7 @@
   <UL>
   
   	<LI><A HREF="#What_is_mod_perl">What is mod_perl</A>
  -	<LI><A HREF="#What_is_covered_in_this_document">What is covered in this document</A>
  +	<LI><A HREF="#What_will_you_learn">What will you learn</A>
   	<LI><A HREF="#References_and_Acknowledgments">References and Acknowledgments</A>
   </UL>
   <!-- INDEX END -->
  @@ -590,7 +642,7 @@
   The primary advantages of mod_perl are power and speed. You have full
   access to the inner-workings of the web server and can intervene at any
   stage of request-processing. This allows for customized processing of (to
  -name just a few of the phases) URI-&amp;gt;filename translation,
  +name just a few of the phases) URI-&gt;filename translation,
   authentication, response generation and logging. There is very little
   run-time overhead. In particular, it is not necessary to start a separate
   process, as is often done with web-server extensions. The most wide-spread
  @@ -603,7 +655,7 @@
   
   <P>
   You can configure your httpd server and handlers in Perl (using
  -<CODE>PerlSetVar</CODE>, and <CODE>lt</CODE>Perl<CODE>gt</CODE> sections). You can even define your own configuration directives.
  +<CODE>PerlSetVar</CODE>, and &lt;Perl&gt; sections). You can even define your own configuration directives.
   
   <P>
   Many people wonder and ask ``How much of a performance improvement does
  @@ -617,7 +669,7 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="What_is_covered_in_this_document">What is covered in this document</A></H1></CENTER>
  +<CENTER><H1><A NAME="What_will_you_learn">What will you learn</A></H1></CENTER>
   <P>
   This document was written in an effort to help one to start using Apache's
   mod_perl extension as quickly and easily as possible. It includes
  @@ -648,7 +700,7 @@
   the problem and found a solution for it. If you ignore this advice, do not
   be surprised if your question goes unanswered - it bores people to answer
   the same question more than once (twice?). This does not mean that you
  -should avoid asking questions, just do not abuse the available help and <STRONG>RTFM</STRONG>before you call for <STRONG>HELP</STRONG>. (You have certainly heard the infamous fable of the shepherd boy and the
  +should avoid asking questions, just do not abuse the available help and <STRONG>RTFM</STRONG> before you call for <STRONG>HELP</STRONG>. (You have certainly heard the infamous fable of the shepherd boy and the
   wolves...)
   
   <P>
  @@ -663,41 +715,44 @@
   I have used the following references while writing this guide:
   
   <UL>
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl FAQ</A></STRONG>
  +<P><LI>
   <P>
  -by Frank Cringle at <A
  +<STRONG>mod_perl FAQ</STRONG> by Frank Cringle at <A
   HREF="http://perl.apache.org/faq/">http://perl.apache.org/faq/</A> .
   
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl performance tuning guide</A></STRONG>
  +<P><LI>
   <P>
  -by Vivek Khera at <A
  +<STRONG>mod_perl performance tuning guide</STRONG> by Vivek Khera at <A
   HREF="http://perl.apache.org/tuning/">http://perl.apache.org/tuning/</A> .
   
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl plugin reference guide</A></STRONG>
  +<P><LI>
   <P>
  -by Doug MacEachern at <A
  +<STRONG>mod_perl plugin reference guide</STRONG> by Doug MacEachern at <A
   HREF="http://perl.apache.org/src/mod_perl.html">http://perl.apache.org/src/mod_perl.html</A>
   .
   
  -<P><LI><STRONG><A NAME="item_Quick">Quick guide for moving from CGI to mod_perl</A></STRONG>
  +<P><LI>
   <P>
  -at <A
  +<STRONG>Quick guide for moving from CGI to mod_perl</STRONG> at <A
   HREF="http://perl.apache.org/dist/cgi_to_mod_perl.html">http://perl.apache.org/dist/cgi_to_mod_perl.html</A>
   .
   
  -<P><LI><STRONG><A NAME="item_mod_perl_traps">mod_perl_traps, common traps and solutions for mod_perl users</A></STRONG>
  +<P><LI>
   <P>
  -at <A
  +<STRONG>mod_perl_traps, common traps and solutions for mod_perl users</STRONG> at <A
   HREF="http://perl.apache.org/dist/mod_perl_traps.html">http://perl.apache.org/dist/mod_perl_traps.html</A>
   .
   
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl mailing list emails</A></STRONG>
  +<P><LI>
   <P>
  -Answers to some of the questions posted to <A
  +<STRONG>mod_perl mailing list emails</STRONG>. Answers to some of the questions posted to <A
   HREF="mailto:modperl@apache.org">modperl@apache.org</A> Apache/Perl mailing
   list.
  +
  +<P><LI>
  +<P>
  +<STRONG>My personal experience with mod_perl</STRONG>.
   
  -<P><LI><STRONG><A NAME="item_My">My personal experience with mod_perl.</A></STRONG>
   </UL>
   <P>
   As I said, I have quoted many information snippets from FAQs and emails,
  @@ -712,33 +767,33 @@
   Major contributors:
   
   <UL>
  -<P><LI><STRONG><A NAME="item_Doug">Doug MacEachern</A></STRONG>
  +<P><LI>
   <P>
  -a big part of this guide is build upon his email replies to the users'
  -questions
  +<STRONG>Doug MacEachern</STRONG>. A big part of this guide is build upon his email replies to users'
  +questions.
   
  -<P><LI><STRONG><A NAME="item_Frank">Frank Cringle</A></STRONG>
  +<P><LI>
   <P>
  -parts of his mod_perl FAQ has been used in the guide.
  +<STRONG>Frank Cringle</STRONG>. Parts of his mod_perl FAQ has been used in the guide.
   
  -<P><LI><STRONG><A NAME="item_Vivek">Vivek Khera</A></STRONG>
  +<P><LI>
   <P>
  -for his mod_perl performance tuning guide.
  +<STRONG>Vivek Khera</STRONG>. For his mod_perl performance tuning guide.
   
  -<P><LI><STRONG><A NAME="item_Steve">Steve Reppucci</A></STRONG>
  +<P><LI>
   <P>
  -who made a thorough review of the stuff I wrote. Fixed lots of spelling and
  -grammar errors, and made the guide readable to English speakers :)
  +<STRONG>Steve Reppucci</STRONG>, who made a thorough review of the stuff I wrote. Fixed lots of spelling
  +and grammar errors, and made the guide readable to English speakers :)
   
  -<P><LI><STRONG><A NAME="item_Eric">Eric Cholet</A></STRONG>
  +<P><LI>
   <P>
  -who wrote complete sections for the guide, and pointed out the errors the
  +<STRONG>Eric Cholet</STRONG>, who wrote complete sections for the guide, and pointed out the errors the
   guide carried away.
   
  -<P><LI><STRONG><A NAME="item_Ken">Ken Williams</A></STRONG>
  +<P><LI>
   <P>
  -who reviewed a lot of stuff in the guide, and many snippets from his emails
  -are included in the guide.
  +<STRONG>Ken Williams</STRONG>, who reviewed a lot of stuff in the guide, and many snippets from his
  +emails are included in the guide.
   
   </UL>
   <P>
  @@ -750,6 +805,7 @@
   <P><LI><STRONG><A NAME="item_Brian">Brian Moseley</A></STRONG>
   <P><LI><STRONG><A NAME="item_Chad">Chad K. Lewis</A></STRONG>
   <P><LI><STRONG><A NAME="item_David">David Landgren</A></STRONG>
  +<P><LI><STRONG><A NAME="item_Dean">Dean Fitz</A></STRONG>
   <P><LI><STRONG><A NAME="item_Doug">Doug Bagley</A></STRONG>
   <P><LI><STRONG><A NAME="item_Ed">Ed Park</A></STRONG>
   <P><LI><STRONG><A NAME="item_Edmund">Edmund Mergl</A></STRONG>
  @@ -776,6 +832,7 @@
   <P><LI><STRONG><A NAME="item_Radu">Radu Greab</A></STRONG>
   <P><LI><STRONG><A NAME="item_Ralf">Ralf Engelschall</A></STRONG>
   <P><LI><STRONG><A NAME="item_Randal">Randal Schwartz</A></STRONG>
  +<P><LI><STRONG><A NAME="item_Rauznitz">Rauznitz Balazs</A></STRONG>
   <P><LI><STRONG><A NAME="item_Richard">Richard Dice</A></STRONG>
   <P><LI><STRONG><A NAME="item_Tzvetan">Tzvetan Stoyanov</A></STRONG>
   <P><LI><STRONG><A NAME="item_Ulrich">Ulrich Pfeifer</A></STRONG>
  @@ -787,7 +844,7 @@
   this amazing idea of mod_perl a reality. This includes Doug MacEachern, the
   author of mod_perl and all the developers who contributed bug patches,
   modules and help. And of course the numerous unseen users who helped to
  -find the bugs and advocate mod_perl around the world.
  +find bugs and advocate the mod_perl around the world.
   
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
  @@ -812,7 +869,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  @@ -887,21 +944,24 @@
   <P>
   <CENTER><H1><A NAME="What_s_inside_">What's inside?</A></H1></CENTER>
   <P>
  -Before you begin to install the mod_perl, you should have an overall
  -picture. There are more then one way you set your mod_perl enabled
  -webserver. You have to decide what mod_perl schema you want to use. <A HREF="././strategy.html#">Picking the Right Strategy</A> chapter presents various approaches, discusses the pros and cons of each
  -one.
  +Before you start with mod_perl installation, you should see an overall
  +picture of this wonderful technology. There is more then one way to use
  +mod_perl enabled webserver. You have to decide what mod_perl schema you
  +want to use. <A HREF="././strategy.html#">Picking the Right Strategy</A>
  +chapter presents various approaches and discusses the pros and cons of
  +them.
   
   <P>
  -Once you know what fits your requirements the best, you should proceed to <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A>. This chapter provides a very detailed scenarios of the schemas discussed
  -in the <A HREF="././strategy.html#">Picking the Right Strategy</A> chapter.
  +Once you know what fits your requirements the best, you should proceed to <A HREF="././scenario.html#">Real World Scenarios Implementaion</A>. This chapter provides a very detailed scenarios of the schemas discussed
  +in the
  +<A HREF="././strategy.html#">Picking the Right Strategy</A> chapter.
   
   <P>
  -<A HREF="././install.html#">Server Installation</A> chapter completes the <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A> by providing more installation details.
  +<A HREF="././install.html#">Server Installation</A> chapter completes the <A HREF="././scenario.html#">Real World Scenarios Implementaion</A> by providing more indepth installation details.
   
   <P>
  -<A HREF="././config.html#">Server Configuration</A> extends the basic configurations presented in the <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A> with extended configurations and solutions to various configuration
  -pitfalls.
  +<A HREF="././config.html#">Server Configuration</A> adds to the basic configurations presented in the <A HREF="././scenario.html#">Real World Scenarios Implementaion</A>
  +extended configurations and various configuration examples.
   
   <P>
   <A HREF="././frequent.html#">Frequent mod_perl problems</A> chapter just collects links to other chapters. It is an attempt to stress
  @@ -910,88 +970,94 @@
   
   <P>
   Probably the most important chapter is <A HREF="././porting.html#">CGI to mod_perl Porting. mod_perl Coding guidelines</A>. It explains what are the differences between scripts running under
  -mod_cgi and mod_perl. What should be done in order to make the existent
  -scripts work under mod_perl. The proper mod_perl coding guidelines.
  +mod_cgi and mod_perl, what should be done in order to make the existent
  +scripts run under mod_perl. Along with the porting notes it provides
  +guidelines for a proper mod_perl programming.
   
   <P>
  -<A HREF="././performance.html#">Performance. Benchmarks</A> is the biggest and very important chapter. It explains the details of
  -tuning the mod_perl and the scripts running under mod_perl, so you can
  -squeeze every ounce of the power from your server. A big part of it are the
  -benchmarks. The numbers that IT managers love to see. But those are
  -different - these benchmarks are comparing mod_perl with other technologies
  -but compare different configurations of mod_perl servers, to guide you in
  -the tuning process. I have to admit - performance tuning is a very hard
  -task, and demands a lot of understanding and experience, but once you get
  -this knowledge - you can make magic with your server.
  +<A HREF="././performance.html#">Performance. Benchmarks</A> is the biggest and a very important chapter. It explains the details of
  +tuning the mod_perl and the scripts running under it, so you can squeeze
  +every ounce of the power from your server. A big part of the chapter are
  +benchmarks, the numbers that IT managers love to read. But these are
  +different benchmarks - they are not comparing mod_perl with other alike
  +technologies but different configurations of mod_perl servers, to guide you
  +through the tuning process. I have to admit - performance tuning is a very
  +hard task, and demands a lot of understanding and experience, but once you
  +acquire this knowledge - you can make a magic with your server.
   
   <P>
   <A HREF="././obvious.html#">Things obvious to others, but not to you</A> is exactly what it claims to be. Some people are too long into this
  -business, and many things have become obvious to them. This is not true for
  -a newbie, this chapter tries to talk about such things.
  +business, and many things have become too obvious to them. This is not true
  +for a newbie, this chapter tries to talk about such things.
   
   <P>
   While developing your mod_perl applications, you are beginning to
   understand that an <CODE>error_log</CODE> file is your best friend. It tells you all the intimate details of what is
  -happening to your scripts, but the problem that it talks in a secret
  +happening to your scripts, but the problem that it speaks a secret
   language. To learn the alphabet and the grammar of this language, refer to
   a <A HREF="././warnings.html#">Warnings and Errors: Where and Why</A>.
   
   <P>
  -If you are into driving relational databases with your cgi scripts, the <A HREF="././databases.html#">mod_perl and Relational Databases</A> chapter will tell you all about what database related goodies mod_perl
  +If you are into a driving of relational databases with your cgi scripts, <A HREF="././databases.html#">mod_perl and Relational Databases</A> chapter will tell you all about database related goodies mod_perl has
   prepared for you.
   
   <P>
   If you are using the good old dbm files for your databases, <A HREF="././dbm.html#">mod_perl and dbm files</A> explains how to utilize them better under mod_perl.
   
   <P>
  -More and more ISPs are evaluating a possibility to give the mod_perl
  -services to their users. Is it possible? Is it secure? Will it work? How
  -much resources? <A HREF="././multiuser.html#">mod_perl for ISPs. mod_perl and Virtual Hosts</A> chapter answers all these questions. If you want to run a mod_perl enabled
  +More and more Internet Service Providers (ISPs) are evaluating a
  +possibility to provide the mod_perl services to their users. Is it
  +possible? Is it secure? Will it work? How much resources does it takes?  <A HREF="././multiuser.html#">mod_perl for ISPs. mod_perl and Virtual Hosts</A>
  +chapter answers all these questions. If you want to run a mod_perl enabled
   server, but do not have a root access read it as well, either to learn how
   do it by yourself, or maybe to persuade your ISP to provide you this
   service.
   
   <P>
  -If you have to administrate your apache mod_perl server - the
  -<A HREF="././control.html#">Controlling and Monitoring the Server</A> chapter is for you. It includes the restarting and monitoring techniques.
  -And very important - how to prevent from server to finish up your disk
  -space in a matter of minutes.
  +If you have to administrate your apache mod_perl server -
  +<A HREF="././control.html#">Controlling and Monitoring the Server</A> chapter is for you. Among the topics there are server restarting and
  +monitoring techniques, preventing from server to eat up all your disk space
  +in a matter of minutes and more.
   
   <P>
   <A HREF="././status.html#">mod_perl Status. Peeking into the Server's Perl Innards</A>
  -chapter shows you the ways you can peek into what is going on in the server
  -while it is running. Like looking what are the value of some global
  -variable. What database connections are open, and much more.
  +chapter shows you the ways you can peek at what is going on in the mod_perl
  +enabled server while it is running. Like looking what is the value of some
  +global variable, what database connections are open, looking up what
  +modules were loaded and their pathes, what is the value of
  +<CODE>@INC</CODE> and much more.
   
   <P>
  -Every programmer need to know how to debug the program. It is _easy_ with
  -perl, you invoke the script with <CODE>-d</CODE> flag and you start debugging it. Is it possible to do under mod_perl, after
  -all you cannot debug every script by running it from the command line?
  -<A HREF="././debug.html#">Debugging mod_perl</A> chapter tells exactly how to do it.
  +Every programmer needs to know how to debug the program she writes. It is
  +an _easy_ task with plain perl. Just invoke the program with <CODE>-d</CODE>
  +flag and debug it. Is it possible to do the same under mod_perl? After all
  +you cannot debug every CGI script by executing it from the command line,
  +some scripts will not run from the command line. <A HREF="././debug.html#">Debugging mod_perl</A> chapter proves it possible and real.
   
   <P>
  -Sometimes browsers that interact with our servers have bugs, creating real
  -problems to the CGI developers. How to prevent this bugs from happening
  -discussed in <A HREF="././browserbugs.html#">Workarounds for some known bugs in browsers</A> chapter.
  +Sometimes browsers that interact with our servers have bugs, which cause a
  +strong headache to CGI developers. Preventing these bugs from happening is
  +being discussed in <A HREF="././browserbugs.html#">Workarounds for some known bugs in browsers</A> chapter.
   
   <P>
  -There many modules were written to extend the mod_perl's core
  -functionality. Some of the important modules are being covered in <A HREF="././modules.html#">Apache::* modules</A>.
  +Many modules were written to extend the mod_perl's core functionality. Some
  +of important modules are being covered in
  +<A HREF="././modules.html#">Apache::* modules</A> chapter.
   
   <P>
  -Some folks decides to go mod_perl, but they miss the basic understanding of
  -the perl, which is not tolerant by mod_perl. if you are such a person,
  -there is nothing to be ashamed of, we all went thru this. Get a good perl
  -book and start reading. <A HREF="././perl.html#">Perl Reference</A> - gives some basic perl lessons, providing the information you cannot start
  -to program mod_perl scripts without.
  +Some folks decide to go mod_perl, but they miss the basic understanding of
  +the perl, which is absolutely not tolerant by mod_perl. If you are such a
  +person, there is nothing to be ashamed of, we all went through this. Get a
  +good perl book and start reading. <A HREF="././perl.html#">Perl Reference</A> gives some basic perl lessons, delivering the knowledge you cannot start to
  +program mod_perl scripts without.
   
   <P>
   <A HREF="././snippets.html#">Code Snippets</A> chapter is just a collection of code snippets I have found useful while
   writing the scripts.
   
   <P>
  -<A HREF="././help.html#">Getting Helped and Further Learning</A> points you to other information sources, like perl programming, security,
  -databases and more.
  +<A HREF="././help.html#">Getting Helped and Further Learning</A> refers you to other related information resources, like learning perl
  +programming and SQL, understanding security, building databases and more.
   
   <P>
   <A HREF="././download.html#">Appendix A: Downloading software and documentation</A>
  @@ -1021,7 +1087,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/14/1999
         </FONT>
       </B>
     </TD>
  @@ -1078,7 +1144,7 @@
   
   	<LI><A HREF="#Do_it_like_me_">Do it like me?!</A>
   	<LI><A HREF="#mod_perl_Deploying_Schemas_Overv">mod_perl Deploying Schemas Overview</A>
  -	<LI><A HREF="#Stand_alone_mod_perl_Enabled_Apa">Stand alone mod_perl Enabled Apache Server</A>
  +	<LI><A HREF="#Standalone_mod_perl_Enabled_Apac">Standalone mod_perl Enabled Apache Server</A>
   	<LI><A HREF="#One_Plain_and_One_mod_perl_enabl">One Plain and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="#One_light_non_Apache_and_One_mod">One light non-Apache and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="#Adding_a_Proxy_Server_in_http_Ac">Adding a Proxy Server in http Accelerator Mode</A>
  @@ -1107,87 +1173,88 @@
   believe a person, saying: <EM>"Do it this way, this is the best!"</EM>. As the old saying says: <EM>"Trust but verify"</EM>. There are too many technologies out there to pick from, and it might take
   an enormous investment of time and money to try to validate each one,
   before deciding what is your favorite one. Keeping this idea in mind, I
  -will try to present different combinations of other technologies and
  -mod_perl or just stand alone mod_perl. How these things work together, what
  -are the good and what are the bad properties of each one, how hard to
  -install and maintain them, when a specific approach should be picked and
  -when it should be avoided.
  +will try to present different combinations of mod_perl and other
  +technologies or just standalone mod_perl. How these things work together,
  +what are the good and what are the bad properties of each one, how hard to
  +install and maintain them, what approaches should be used and what to be
  +avoided.
   
   <P>
  -To make myself clear, I would not talk about any technologies but the ones
  -useful in tandem with mod_perl.
  +To make myself clear, I would not talk about any technologies and tools,
  +but the ones complementing mod_perl.
   
   <P>
   Please let me stress it again: <STRONG>DO NOT</STRONG> blindly copy someone's setup and hope for a good. Choose what is best for
  -your situation.
  +your situation. it might take _some_ effort to find it out.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="mod_perl_Deploying_Schemas_Overv">mod_perl Deploying Schemas Overview</A></H1></CENTER>
   <P>
   There are several different ways to build, configure and deploy your
  -mod_perl enabled site. Some of the ways are:
  +mod_perl enabled server. Some of them are:
   
   <OL>
   <P><LI>
   <P>
  -1 binary and 1 config file (one big binary for mod_perl)
  +Having 1 binary and 1 config file (one big binary for mod_perl)
   
   <P><LI>
   <P>
  -2 binaries and 2 config files (one big binary for mod_perl and one small
  -for static object like images)
  +Having 2 binaries and 2 config files (one big binary for mod_perl and one
  +small for static object like images)
   
   <P><LI>
   <P>
  -1 DSO style compile and 2 config files (Dynamic linking lets you compile
  -once and have a big and a small binary in memory BUT you have to deal with
  -a freshly made solution that has week documentation and is still subject to
  -change and is rather more complex)
  +Having 1 DSO style binary, mod_perl loadable object and 2 config files
  +(Dynamic linking lets you compile once and have a big and a small binary in
  +memory BUT you have to deal with a freshly made solution that has week
  +documentation and is still subject to change and is rather more complex)
   
   <P><LI>
   <P>
  -Any of the 3 approaches above plus proxy server in the http accelerator
  -mode.
  +Any of the above plus proxy server in the http accelerator mode.
   
   </OL>
   <P>
   If you are a newbie, I would recommend you to start with the first option
   and work on getting your feet wet with apache and mod_perl, then decide
  -whether to move to a second one for production work or move up to the more
  -state-of-the-art-yet-suspiciously-new DSO system (third) or/and proven to
  -be good forth option from above.
  +whether to move to the second one which allows a better tuning for the
  +price of more complicated administration or to the more
  +state-of-the-art-yet-suspiciously-new DSO system (third one) or/and to the
  +forth option which brings you even more power.
   
   <P>
  -Option 1 will kill you in production if you load out a lot of static data
  -with a 2-12 MB webserver process. On the other hand while testing you will
  +First option will kill your production site if you serve a lot of static
  +data with a 2-12 MB webservers. On the other hand while testing you will
   have no other server interaction to mask or add to your errors.
   
   <P>
  -Option 2 means keeping two compiles but lets you seriously tune the two
  -binaries to their exact purpose. On the other hand you have to deal with
  -proxying or fancy site design to keep the two servers in step. Choose
  -serving on multiple ports, multiple IPs, etc...
  -
  -<P>
  -Option 3 (DSO) -- as mentioned above -- means playing with the bleeding
  -edge. Also the <CODE>mod_so</CODE> adds size and complexity to your binaries. The benefit being that modules
  -can be added and removed with out recompiling and even shared amongst
  -multiple servers. Again, it is bleeding edge and still sort of platform
  -wonky so YMMV. See
  -<A HREF="././scenario.html#mod_perl_server_as_DSO">mod_perl server as DSO</A>.
  +Second option allows you to seriously tune the two servers and get the
  +maximum performance. On the other hand you have to deal with proxying or
  +fancy site design to keep the two servers in step. Choose serving on
  +multiple ports, multiple IPs, etc... You also have to admimistrate one more
  +server.
  +
  +<P>
  +Third option (DSO) -- as mentioned above -- means playing with the bleeding
  +edge. In addition <CODE>mod_so</CODE> (the DSO module) adds size and complexity to your binaries. With DSO
  +modules can be added and removed without recompiling the server and even
  +shared amongst multiple servers. Again, it is bleeding edge and still sort
  +of platform wonky, but your milegue may vary. See <A HREF="././scenario.html#mod_perl_server_as_DSO">mod_perl server as DSO</A>.
   
   <P>
  -Option 4 (proxy in http accelerator mode) - should make you lots of good
  -things, once correctly configured and tuned.
  +Forth option (proxy in http accelerator mode) - improves the performance by
  +caching and buffering, once correctly configured and tuned.
   
   <P>
   The rest of this chapter discuss the pros and the cons of each of the
  -presented schemas. <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A> describes the implementation techniques of described schemas.
  +presented schemas. <A HREF="././scenario.html#">Real World Scenarios Implementaion</A>
  +describes the implementation techniques of described schemas.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="Stand_alone_mod_perl_Enabled_Apa">Stand alone mod_perl Enabled Apache Server</A></H1></CENTER>
  +<CENTER><H1><A NAME="Standalone_mod_perl_Enabled_Apac">Standalone mod_perl Enabled Apache Server</A></H1></CENTER>
   <P>
   The first approach is to implement a straightforward mod_perl server. Just
   take your plain apache server and add to it the mod_perl, like you add any
  @@ -1375,6 +1442,10 @@
   does not spawn child processes.
   
   <P>
  +Meta: Hey No personal experience. Please let me know if I have missed some
  +pros/cons here. Thanks!
  +
  +<P>
   The Advantages:
   
   <UL>
  @@ -1400,7 +1471,8 @@
   <UL>
   <P><LI>
   <P>
  -Not that I know of :)
  +Lucks some apache's features, like access control, error redirection,
  +logfile format and so on. 
   
   </UL>
   <P>
  @@ -1639,6 +1711,22 @@
     ProxyPassReverse /modperl/ <A HREF="http://localhost:81/modperl/">http://localhost:81/modperl/</A>
   </PRE>
   <P><LI>
  +<P>
  +It does mod_perl output buffering as squid. See the implementation notes
  +for more details
  +
  +<P><LI>
  +<P>
  +It even does caching. You have to produce correct <CODE>Content-Length</CODE>,
  +<CODE>Last-Modified</CODE> and <CODE>Expires</CODE> http headres for it to work. If some dynamic content is not to change
  +constantly, you can dramatically increase performance with caching it by
  +ProxyPass.
  +
  +<P><LI>
  +<P>
  +<CODE>ProxyPass</CODE> happens before the authentication phase, so you do not have to worry about
  +authenticating twice.
  +
   </UL>
   <P>
   The Disadvantages:
  @@ -1672,7 +1760,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/17/1999
         </FONT>
       </B>
     </TD>
  @@ -1699,7 +1787,7 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
   <HTML>
   <HEAD>
  -   <TITLE>mod_perl guide: Real World Scenarios of Implementing Various Strategies</TITLE>
  +   <TITLE>mod_perl guide: Real World Scenarios Implementaion</TITLE>
      <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
      <META NAME="Author" CONTENT="Bekman Stas">
      <META NAME="Description" CONTENT="All Apache/Perl related information: Hints, 
  @@ -1721,7 +1809,7 @@
   <H1 ALIGN=CENTER>
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A>
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  -Real World Scenarios of Implementing Various Strategies</H1>
  +Real World Scenarios Implementaion</H1>
   <HR WIDTH="100%">
   	    [    <A HREF="strategy.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="install.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
  @@ -1751,6 +1839,7 @@
   	<LI><A HREF="#Running_1_webserver_and_squid_in">Running 1 webserver and squid in httpd accelerator mode</A>
   	<LI><A HREF="#Using_mod_proxy">Using mod_proxy</A>
   	<LI><A HREF="#mod_perl_server_as_DSO">mod_perl server as DSO</A>
  +	<LI><A HREF="#HTTP_Authentication_with_2_serve">HTTP Authentication with 2 servers + proxy</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -2642,12 +2731,27 @@
   <PRE>  ProxyPass /modperl/ <A HREF="http://localhost:81/modperl/">http://localhost:81/modperl/</A>
     ProxyPassReverse /modperl/ <A HREF="http://localhost:81/modperl/">http://localhost:81/modperl/</A>
   </PRE>
  +<P>
  +<CODE>PPR</CODE> is the saving grace here, that makes Apache a win over Squid. That cleans
  +up redirects and stuff to remove the :81 from the URIs. Very nice.
  +
  +<P>
  +You can control the buffering feature with <CODE>ProxyReceiveBufferSize</CODE>
  +directive:
  +
  +<P>
  +<PRE>  ProxyReceiveBufferSize 1048576
  +</PRE>
   <P>
  -<CODE>PPR</CODE> is the saving grace here, that makes Apache a win for me over Squid. That
  -cleans up redirects and stuff to remove the :81 from the URIs. Very nice.
  +will set a buffer size to be of 1Mb. If it is not set explicitly, then the
  +default buffer size is used, which depends on OS, for Linux I suspect it is
  +somewhere below 32k. So basicaly to get an immediate release of the
  +mod_perl server, <CODE>ProxyReceiveBufferSize</CODE> should be set to a value greater than the biggest generated respond
  +produced by any mod_perl script.
   
   <P>
  -Ask Bjoern Hansen has written a <CODE>mod_proxy_add_forward.c</CODE> module for Apache, that sets the <CODE>X-Forwarded-For</CODE> field when doing a <CODE>ProxyPass</CODE>, similar to what Squid can do. His patch is at: <A
  +Ask Bjoern Hansen has written a <CODE>mod_proxy_add_forward.c</CODE> module for Apache, that sets the <CODE>X-Forwarded-For</CODE> field when doing a
  +<CODE>ProxyPass</CODE>, similar to what Squid can do. His patch is at: <A
   HREF="http://modules.apache.org/search?id=124">http://modules.apache.org/search?id=124</A>
   or at <A
   HREF="ftp://ftp.netcetera.dk/pub/apache/">ftp://ftp.netcetera.dk/pub/apache/</A>
  @@ -2703,20 +2807,49 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="mod_perl_server_as_DSO">mod_perl server as DSO</A></H1></CENTER>
   <P>
  -To build the mod_perl as DSO add <CODE>USE_DSO=1</CODE> to the rest of configuration parameters, like:
  +To build the mod_perl as DSO add <CODE>USE_DSO=1</CODE> to the rest of configuration parameters (so it will build libperl.so and
  +not libperl.a), like:
   
   <P>
   <PRE>  perl Makefile.PL USE_DSO=1 ...
   </PRE>
   <P>
  +If you run <CODE>./configure</CODE> from apache source do not forget to add:
  +<CODE>--enable-shared=perl</CODE>
  +
  +
  +
  +<P>
   Then just add the <CODE>LoadModule</CODE> into your <CODE>httpd.conf</CODE>.
   
   <P>
   You will find a complete explanation in the <CODE>INSTALL.apaci</CODE> pod which can be found in the mod_perl distribution.
   
   <P>
  +Some people reported that DSO compiled mod_perl would not run on specific
  +OS/perl version. Also threads enabled perl reported sometimes to break the
  +mod_perl/DSO. But it still can work correctly for you.
  +
  +<P>
   &lt;META&gt; Incomplete &lt;/META&gt;
   
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="HTTP_Authentication_with_2_serve">HTTP Authentication with 2 servers + proxy</A></H1></CENTER>
  +<P>
  +Assuming that you have a setup of one ``front-end'' server, which provides
  +proxies the ``back-end'' (mod_perl) server, if you need to perform the
  +athentication in the ``back-end'' server, it should handle all
  +authentication. If Apache proxies correctly, it seems like it would pass
  +through all authentication information, making the ``front-end'' Apache
  +somewhat ``dumb,'' as it does nothing but pass through information.
  +
  +<P>
  +The only possible caveat in config file is that your Auth stuff needs to be
  +in &lt;Directory ...&gt; ... &lt;/Directory&gt; tags because if you use a
  +&lt;Location /&gt; ... &lt;/Location&gt; the proxypass server takes the
  +auth info for its authentication and would not pass it on.
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
  @@ -2740,7 +2873,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  @@ -2815,7 +2948,7 @@
   
   	<LI><A HREF="#Is_it_possible_to_install_and_us">Is it possible to install and use apache/mod_perl without having a root access?</A>
   	<LI><A HREF="#Is_it_possible_to_determine_whic">Is it possible to determine which options were given to modperl's Makefile.PL</A>
  -	<LI><A HREF="#Server_Installation">Server Installation</A>
  +	<LI><A HREF="#Server_Installation_problems">Server Installation problems</A>
   	<UL>
   
   		<LI><A HREF="#make_test_fails">make test fails</A>
  @@ -2851,8 +2984,7 @@
   <PRE>  Do you wish to use dynamic loading? [y]
   </PRE>
   <P>
  -You will want this feature on to dynamically load the Perl
  -Modules/extensions.
  +Answer <CODE>y</CODE> to be able to load dynamically Perl Modules extensions.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -2958,8 +3090,8 @@
   <CODE>telnet</CODE> to talk directly to the web server.
   
   <P>
  -Assume that you set <CODE>Port 8080</CODE> in the httpd.conf for your mod_perl enabled server. Telnet to your server
  -at port 8080, and type <CODE>HEAD / HTTP/1.0</CODE> then press the &lt;ENTER&gt; key TWICE!
  +Assuming that your mod_perl enabled server listens to port 8080, telnet to
  +your server at port 8080, and type <CODE>HEAD / HTTP/1.0</CODE> then press the &lt;ENTER&gt; key TWICE!
   
   <P>
   <PRE>  % telnet yourserver.com 8080&lt;ENTER&gt;
  @@ -3017,7 +3149,8 @@
   <PRE>  % chmod a+x test.pl
   </PRE>
   <P>
  -Now fetch the URL <CODE>http://www.you.com:8080/perl/test.pl</CODE>. You should see something like this (part of the output was snipped).
  +Now fetch the URL <CODE>http://www.you.com:8080/perl/test.pl</CODE> (replace 8080 with the port your mod_perl enabled server is listening to.
  +You should see something like this (part of the output was snipped).
   
   <P>
   <PRE>  SERVER_SOFTWARE    Apache/1.3.6 (Unix) mod_perl/1.19
  @@ -3085,6 +3218,9 @@
   To see the server's version only.
   
   <P>
  +Again use <CODE>www.site.com:port_number</CODE> if your server is listening to a non-default 80 port.
  +
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Is_it_possible_to_install_and_us">Is it possible to install and use apache/mod_perl without having a root access?</A></H1></CENTER>
   <P>
  @@ -3117,19 +3253,23 @@
   the host will ask you to shutdown your mod_perl server, or to find another
   home for it. You have a few solutions:
   
  +<UL>
  +<P><LI>
   <P>
  -<STRONG>a</STRONG>. Reduce resource usage - see <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>
  +Reduce resource usage - see <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>
   
   
   
  +<P><LI>
   <P>
  -<STRONG>b</STRONG>. Ask your ISP if you can put a dedicated machine into their computer room
  +Ask your ISP if you can put a dedicated machine into their computer room
   and be root there.
   
  +<P><LI>
   <P>
  -<STRONG>c</STRONG>. Look for another ISP with lots of resources or one that supports mod_perl
  -(not likely)
  +Look for another ISP with lots of resources or one that supports mod_perl.
   
  +</UL>
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Is_it_possible_to_determine_whic">Is it possible to determine which options were given to modperl's Makefile.PL</A></H1></CENTER>
  @@ -3163,7 +3303,7 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="Server_Installation">Server Installation</A></H1></CENTER>
  +<CENTER><H1><A NAME="Server_Installation_problems">Server Installation problems</A></H1></CENTER>
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="make_test_fails">make test fails</A></H2></CENTER>
  @@ -3217,7 +3357,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  @@ -3279,6 +3419,7 @@
   		<LI><A HREF="#Location_Configuration">Location Configuration</A>
   		<LI><A HREF="#PerlFreshRestart">PerlFreshRestart</A>
   		<LI><A HREF="#_perl_status_location">/perl-status location</A>
  +		<LI><A HREF="#PerlSetVar_PerlSetEnv_and_PerlP">PerlSetVar, PerlSetEnv and PerlPassEnv</A>
   		<LI><A HREF="#perl_startup_file">perl-startup file</A>
   		<UL>
   
  @@ -3289,6 +3430,7 @@
   
   	</UL>
   
  +	<LI><A HREF="#Running_apachectl_configtest_o">Running 'apachectl configtest' or 'httpd -t'</A>
   	<LI><A HREF="#Perl_behavior_controls">Perl behavior controls</A>
   	<LI><A HREF="#Tuning_MinSpareServers_MaxSpareS">Tuning MinSpareServers MaxSpareServers StartServers MaxClients</A>
   	<LI><A HREF="#Publishing_port_numbers_differen">Publishing port numbers different from 80</A>
  @@ -3305,6 +3447,7 @@
   		<LI><A HREF="#the_server_no_longer_retrieves_t">the server no longer retrieves the DirectoryIndex files for a directory</A>
   	</UL>
   
  +	<LI><A HREF="#Configuration_Security_Concerns">Configuration Security Concerns</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -3422,7 +3565,9 @@
   <P>
   <STRONG>PerlSendHeader On</STRONG> tells the server to send an HTTP header to the browser on every script
   invocation. You will want to turn this off for nph (non-parsed-headers)
  -scripts.
  +scripts. <CODE>PerlSendHeader On</CODE> means to call <CODE>ap_send_http_header()</CODE> after parsing your script
  +headers. It is only meant for CGI emulation, its always better to use
  +CGI-&gt;header or $r-&gt;send_http_header directly.
   
   <P>
   Remember the <STRONG>Alias</STRONG> from the section above? We must use the same Alias here, if you use
  @@ -3482,6 +3627,30 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="PerlSetVar_PerlSetEnv_and_PerlP">PerlSetVar, PerlSetEnv and PerlPassEnv</A></H2></CENTER>
  +<P>
  +<PRE>  PerlSetEnv key val
  +  PerlPassEnv key
  +</PRE>
  +<P>
  +Set and Pass the ENV variables to your scripts. So you can read them in
  +your scripts from <CODE>%ENV</CODE> (e.g. <CODE>$ENV{&quot;key&quot;}</CODE>)
  +
  +<P>
  +<CODE>PerlSetVar</CODE> is very similar to <CODE>PerlSetEnv</CODE>, but you extract it with another method. In &lt;Perl&gt; sections:
  +
  +<P>
  +<PRE>  push @{ $Location{&quot;/&quot;}-&gt;{PerlSetVar} }, [ 'FOO' =&gt; BAR ];
  +</PRE>
  +<P>
  +and in the code you read it with:
  +
  +<P>
  +<PRE>  my $r = Apache-&gt;request;
  +  print $r-&gt;dir_config('FOO');
  +</PRE>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="perl_startup_file">perl-startup file</A></H2></CENTER>
   <P>
   Since many times you have to add many perl directives to the configuration
  @@ -3566,6 +3735,34 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Running_apachectl_configtest_o">Running 'apachectl configtest' or 'httpd -t'</A></H1></CENTER>
  +<P>
  +<CODE>apachectl configtest</CODE> tests the configuration file without starting the server. You can safely
  +modify the configuration file on your production server, if you run this
  +test before you restart the server. Of course it is not 100% errorprone,
  +but it will reveal any syntaxical errors you might do while editing the
  +file.
  +
  +<P>
  +<CODE>apachectl configtest</CODE> is the same as <CODE>httpd -t</CODE> and it actually executes the code in startup.pl, not just parses it. &lt;Perl&gt; configuration has always started Perl during the configuration
  +read,
  +<CODE>Perl{Require,Module}</CODE> do so as well.
  +
  +<P>
  +If you want your startup code to get a control over the <CODE>-t</CODE>
  +(configtest) server launch, start the server configuration test with 
  +
  +<P>
  +<PRE>  httpd -t -Dsyntax_check
  +</PRE>
  +<P>
  +and in your startup file, add:
  +
  +<P>
  +<PRE>  return if Apache-&gt;define('syntax_check');
  +</PRE>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Perl_behavior_controls">Perl behavior controls</A></H1></CENTER>
   <P>
   For <STRONG>PerlWarn</STRONG> and <STRONG>PerlTaintCheck</STRONG> see <A HREF="././porting.html#Switches_w_T">Switches -w, -T</A>
  @@ -3912,6 +4109,39 @@
   problem has gone away after placing the usage of mod_perl in a
   &lt;File&gt;- section.
   
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Configuration_Security_Concerns">Configuration Security Concerns</A></H1></CENTER>
  +<P>
  +It is better not to advertise the port mod_perl server running at to the
  +outside world for it creates a potential security risk by revealing which
  +<CODE>module(s)</CODE> and/or OS you are running your web server on.
  +
  +<P>
  +The more modules you have in your web server, the more complex the code in
  +your webserver.
  +
  +<P>
  +The more complex the code in your web server, the more chances for bugs.
  +
  +<P>
  +The more chance for bugs, the more chance that some of those bugs may
  +involve security.
  +
  +<P>
  +Never was completely sure why the default of the ServerToken directive in
  +Apache is Full rather than Minimal. Seems like you would only make it full
  +if you are debugging.
  +
  +<P>
  +For more information see <A HREF="././config.html#Publishing_port_numbers_differen">Publishing port numbers different from 80</A>
  +
  +
  +
  +<P>
  +Another approach is to modify httpd sources to reveal no unwanted
  +information, so if you know the port the <CODE>HEAD</CODE> request will return an empty or phony <CODE>Server:</CODE> field.
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
  @@ -3935,7 +4165,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  @@ -4142,6 +4372,7 @@
   		<LI><A HREF="#Memory_leakage">Memory leakage</A>
   	</UL>
   
  +	<LI><A HREF="#Passing_ENV_variables_to_CGI">Passing ENV variables to CGI</A>
   	<LI><A HREF="#Filehandlers_and_locks_leakages">Filehandlers and locks leakages</A>
   	<UL>
   
  @@ -4153,6 +4384,7 @@
   	<LI><A HREF="#Redirecting_Errors_to_Client_ins">Redirecting Errors to Client instead of error_log</A>
   	<LI><A HREF="#Finding_the_line_number_the_erro">Finding the line number the error/warning has been triggered at</A>
   	<LI><A HREF="#Forking_subprocesses_from_mod_pe">Forking subprocesses from mod_perl</A>
  +	<LI><A HREF="#Generating_correct_HTTP_MIME_Hea">Generating correct HTTP MIME Headers</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -5089,6 +5321,16 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Passing_ENV_variables_to_CGI">Passing ENV variables to CGI</A></H1></CENTER>
  +<P>
  +To pass an environment variable from a configuration file, add to it:
  +
  +<P>
  +<PRE>  PerlSetEnv key val
  +  PerlPassEnv key
  +</PRE>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Filehandlers_and_locks_leakages">Filehandlers and locks leakages</A></H1></CENTER>
   <P>
   At the beginning there was:
  @@ -5461,12 +5703,16 @@
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Finding_the_line_number_the_erro">Finding the line number the error/warning has been triggered at</A></H1></CENTER>
  +<P>
  +<CODE>Apache::Registry</CODE>, <CODE>Apache::PerlRun</CODE> and modules that compile-via-eval confuse the line numbering. Other files
  +that are read normally by Perl from disk have no problem with file
  +name/line number.
  +
   <P>
  -If you compile with the experimental <STRONG>PERL_MARK_WHERE=1</STRONG>, it shows you ``exactly'' where this is happening. many times compiler
  -makes a shift for ``unknown'' reasons in its line counter. You can always
  -stuff your code with special compiler directives, to reset its counter to
  -the value you will tell. At the beginning of the line you should write (the
  -'#' in column 1):
  +If you compile with the experimental <STRONG>PERL_MARK_WHERE=1</STRONG>, it shows you ``exactly'' where this is happening. Generally compiler
  +makes a shift in its line counter. You can always stuff your code with
  +special compiler directives, to reset its counter to the value you will
  +tell. At the beginning of the line you should write (the '#' in column 1):
   
   <P>
   <PRE>  #line 298 myscript.pl
  @@ -5570,7 +5816,40 @@
   want is to send information to the browser and then do some
   post-processing, look into <CODE>PerlCleanupHandler</CODE>.
   
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Generating_correct_HTTP_MIME_Hea">Generating correct HTTP MIME Headers</A></H1></CENTER>
  +<P>
  +The <CODE>Apache::print()</CODE> routine has to gather up the headers that your script outputs, in order to
  +pass them to <CODE>$r-&amp;gt;send_http_header</CODE>. This happens in <CODE>src/modules/perl/Apache.xs</CODE> (<CODE>print</CODE>) and
  +<CODE>Apache/Apache.pm</CODE> (<CODE>send_cgi_header</CODE>). There is a shortcut in there, namely the assumption that each print
  +statement contains one or more complete headers. If for example you used to
  +generate a
  +<CODE>Set-Cookie</CODE> header by multiply <CODE>print()</CODE> statements, like:
  +
  +<P>
  +<PRE>   print &quot;Content-type: text/html\n&quot;;
  +   print &quot;Set-Cookie: iscookietext\; &quot;;
  +   print &quot;expires=Wednesday, 09-Nov-1999 00:00:00 GMT\; &quot;;
  +   print &quot;path=\/\; &quot;;
  +   print &quot;domain=\.mmyserver.com\; &quot;;
  +   print &quot;\n\n&quot;;
  +   print &quot;hello&quot;;
  +</PRE>
  +<P>
  +your generated <CODE>Set-Cookie</CODE> header is split over a number of print statements and gets lost. Try this:
  +
  +<P>
  +<PRE>   print &quot;Content-type: text/html\n&quot;;
  +   my $cookie = &quot;Set-Cookie: iscookietext\; &quot;;
  +   $cookie .= &quot;expires=Wednesday, 09-Nov-1999 00:00:00 GMT\; &quot;;
  +   $cookie .= &quot;path=\/\; &quot;;
  +   $cookie .= &quot;domain=\.mmyserver.com\; &quot;;
  +   print $cookie;
  +   print &quot;\n\n&quot;;
  +   print &quot;hello&quot;;
  +</PRE>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
   	     book can be purchased online from <a
  @@ -5593,7 +5872,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  @@ -5644,7 +5923,7 @@
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
   Performance. Benchmarks.</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="hardware.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  @@ -7229,11 +7508,11 @@
   Many old CGIs were written in style of:
   
   <P>
  -<PRE>  print &quot;&lt;BODY BGCOLOR=\&quot;black\&quot; TEXT=\&quot;white\&quot;&gt;&quot;;
  +<PRE>  print &quot;&lt;BODY BGCOLOR=&quot;black&quot; TEXT=&quot;white&quot;&gt;&quot;;
     print &quot;&lt;H1&gt;&quot;;
     print &quot;Hello&quot;;
     print &quot;&lt;/H1&gt;&quot;;
  -  print &quot;&lt;A HREF=\&quot;foo.html\&quot;&gt; foo &lt;/A&gt;&quot;;
  +  print &quot;&lt;A HREF=&quot;foo.html&quot;&gt; foo &lt;/A&gt;&quot;;
     print &quot;&lt;/BODY&gt;&quot;;
   </PRE>
   <P>
  @@ -7357,7 +7636,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]
  +	     [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="hardware.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  @@ -7370,7 +7649,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/14/1999
         </FONT>
       </B>
     </TD>
  @@ -7397,7 +7676,7 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
   <HTML>
   <HEAD>
  -   <TITLE>mod_perl guide: Things obvious to others, but not to you</TITLE>
  +   <TITLE>mod_perl guide: Choosing an Operating System and a Hardware</TITLE>
      <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
      <META NAME="Author" CONTENT="Bekman Stas">
      <META NAME="Description" CONTENT="All Apache/Perl related information: Hints, 
  @@ -7419,36 +7698,37 @@
   <H1 ALIGN=CENTER>
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A>
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  -Things obvious to others, but not to you</H1>
  +Choosing an Operating System and a Hardware</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  -	<LI><A HREF="#Coverage">Coverage</A>
  -	<LI><A HREF="#my_scoped_variable_in_nested_s">my() scoped variable in nested subroutines</A>
  +	<LI><A HREF="#Is_it_important_">Is it important?</A>
  +	<LI><A HREF="#Operating_System_Choosing">Operating System Choosing</A>
   	<UL>
   
  -		<LI><A HREF="#The_poison">The poison</A>
  -		<LI><A HREF="#The_diagnosis">The diagnosis</A>
  -		<LI><A HREF="#The_remedy">The remedy</A>
  +		<LI><A HREF="#Stability_and_Robustness">Stability and Robustness</A>
  +		<LI><A HREF="#Memory_Management">Memory Management</A>
  +		<LI><A HREF="#Memory_Leakages">Memory Leakages</A>
  +		<LI><A HREF="#Sharing_Memory">Sharing Memory</A>
  +		<LI><A HREF="#Cost_and_Support">Cost and Support</A>
  +		<LI><A HREF="#Discontinued_products">Discontinued products</A>
  +		<LI><A HREF="#OS_Releases">OS Releases</A>
   	</UL>
   
  -	<LI><A HREF="#Reloading_Modules_and_Required_F">Reloading Modules and Required Files</A>
  +	<LI><A HREF="#Hardware_Choosing">Hardware Choosing</A>
   	<UL>
   
  -		<LI><A HREF="#Restarting_the_server">Restarting the server</A>
  -		<LI><A HREF="#Using_Apache_StatINC">Using Apache::StatINC</A>
  -		<LI><A HREF="#Reloading_only_specific_files">Reloading only specific files</A>
  +		<LI><A HREF="#Site_s_traffic">Site's traffic</A>
  +		<LI><A HREF="#Cash">Cash</A>
  +		<LI><A HREF="#IO_performance">IO performance</A>
  +		<LI><A HREF="#Memory">Memory</A>
  +		<LI><A HREF="#Internet_Connection">Internet Connection</A>
  +		<LI><A HREF="#Bottlenecks">Bottlenecks</A>
  +		<LI><A HREF="#Conclusion">Conclusion</A>
   	</UL>
   
  -	<LI><A HREF="#Compiled_Regular_Expressions">Compiled Regular Expressions </A>
  -	<LI><A HREF="#Debugging_your_code_in_Single_Se">Debugging your code in Single Server Mode</A>
  -	<LI><A HREF="#_M_and_other_time_file_tests_u">-M and other time() file tests under mod_perl</A>
  -	<LI><A HREF="#Handling_the_User_pressed_Stop_">Handling the 'User pressed Stop button' case</A>
  -	<LI><A HREF="#Handling_the_server_timeout_case">Handling the server timeout cases</A>
  -	<LI><A HREF="#Where_do_the_warnings_errors_go_">Where do the warnings/errors go?</A>
  -	<LI><A HREF="#Setting_environment_variables_fo">Setting environment variables for scripts called from CGI.</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -7466,118 +7746,593 @@
   
   	      <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P>
  -<CENTER><H1><A NAME="Coverage">Coverage</A></H1></CENTER>
  +<CENTER><H1><A NAME="Is_it_important_">Is it important?</A></H1></CENTER>
   <P>
  -This document describes ``special'' traps you may encounter when running
  -your plain CGIs under Apache::Registry and Apache::PerlRun.
  +You can invest a lot of time and money into a server tuning and code
  +rewriting according the guidelines you have just learned, but your
  +performance will be really bad if you did not took into account the
  +hardware demands, and did not wisely chosen the operational system suited
  +for your needs. While tips below apply to any webserver, they are written
  +for a mod_perl enabled webservers' administrators.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="my_scoped_variable_in_nested_s">my() scoped variable in nested subroutines</A></H1></CENTER>
  +<CENTER><H1><A NAME="Operating_System_Choosing">Operating System Choosing</A></H1></CENTER>
  +<P>
  +First lets talk about Operating Systems (OS). While personally I am a Linux
  +devotee, I do not want to start yet another OS war. Assuming this, I will
  +try to define what you should be looking for, then when you know what do
  +you want from your to be chosen OS, go find it. Enter the newsgroup of an
  +OS you think is a good candidate, and tell: ``I need an OS with good X,
  +fast Y and stable Z, do you think Foo OS answers all of my demands?'' I
  +will leave this fan research up to you. But I would use linux :) Just
  +kidding...
  +
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H2><A NAME="The_poison">The poison</A></H2></CENTER>
  +<CENTER><H2><A NAME="Stability_and_Robustness">Stability and Robustness</A></H2></CENTER>
   <P>
  -In a non modperl script (stand alone or CGI), there is no problem writing
  -code like this:
  +Probably the most important feature we want from OS is its stability and
  +robustness. We are into an Internet business, which does not have working
  +hours, like many conventional businesses we know about (9pm to 5pm). We are
  +open 24 hours a day. We can not afford off line periods, for our customers
  +will go shop for another service like ours, unless you have a monopoly :) .
  +If the OS of your choice crashes every day or so, I would throw it away,
  +after doing a little investigation, for there are might be a reason for a
  +system crash. Like a runaway server that eats up all the memory and disk,
  +so we cannot blame the OS for that. Generally people who use the OS for
  +some time can tell you a lot about its stability.
   
   <P>
  -<PRE>    use CGI qw/param/;
  -    my $x = param('x');
  -    sub printit {
  -       print &quot;$x\n&quot;;
  -    }
  -</PRE>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Memory_Management">Memory Management</A></H2></CENTER>
   <P>
  -However, the script is run under Apache::Registry, it will in fact be
  -repackaged into something like this:
  +You want an OS with good memory management, for some OSes are well known as
  +memory hogs. The same code can use as twice as much memory on one OS
  +compared to the other. If the size of the mod_perl process is 10Mb and you
  +have tens of these running, it definitely adds up!
   
   <P>
  -<PRE>  package $mangled_package_name;
  -  sub handler {
  -    #line1 $original_filename
  -    use CGI qw/param/;
  -    my $x = param('x');
  -    sub printit {
  -       print &quot;$x\n&quot;;
  -    }
  -  }
  -</PRE>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Memory_Leakages">Memory Leakages</A></H2></CENTER>
   <P>
  -Now <CODE>printit</CODE> is an inner named subroutine. Because it is referencing a lexical variable
  -from an enclosing scope, a closure is created.
  +Some OSes and/or the libraries (like c libs) suffer from bad memory
  +leakages. You cannot afford such a system, for you are already know that a
  +single mod_perl process sometimes serves thousands of requests before it is
  +being put to death. So if the leaks add up on every request, your memory
  +demands will be huge. Of course your code can be guilty for the memory
  +leakages as well (check out the <CODE>Apache::Leak</CODE>
  +module). Certainly you can lower the number of requests to be served over
  +the process' life, but a performance degrade.
   
   <P>
  -The first time the script is run, the correct value of <CODE>$x</CODE> will
  -be printed. However on subsequent runs, <CODE>printit</CODE> will retain the initial value of <CODE>$x</CODE> -- not what you want.
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Sharing_Memory">Sharing Memory</A></H2></CENTER>
  +<P>
  +You want an OS with good sharing capabilities. As you have learned, if you
  +preload the modules and scripts at the server startup, they are being
  +shared between the spawned children, at least for a part of a process' life
  +span, since memory pages are getting ``dirty'' and ceasing to be shared.
  +This feature can save you up a lot of memory!!!
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H2><A NAME="The_diagnosis">The diagnosis</A></H2></CENTER>
  +<CENTER><H2><A NAME="Cost_and_Support">Cost and Support</A></H2></CENTER>
   <P>
  -Always use -w (or/and PerlWarn ON)! Perl will then emit a warning like:
  +If you are into a big business you are not overly concerned about paying
  +$1000+ for some fancy OS and to get the bundled support for it. But if your
  +resources are low, you will look for a cheaper and free OSes. Free does not
  +mean bad, it can be quite the opposite as we all either know from our own
  +experience or read about in news. Free OSes can have and do have the best
  +support you can find. It is very easy to understand - most of the people
  +are not rich and will try to use a cheaper or free OS first if it does the
  +work for them. Since it really fits their needs, many people keep using it
  +and eventually know it quite good to provide a support for others in
  +trouble. Why would they do it for free? For a real spirit of the first days
  +of the Internet, when there was no commercial Internet and people helped
  +each other, because someone helped them in first place. I was there, I was
  +touched by that spirit and I will do anything to keep this spirit alive.
   
   <P>
  -<PRE>  Value of $x will not stay shared at - line 5.
  -</PRE>
  -<P>
  -NOTE: Subroutines defined inside <STRONG>BEGIN{}</STRONG> and <STRONG>END{}</STRONG> cannot trigger this message, since each <STRONG>BEGIN{}</STRONG> and <STRONG>END{}</STRONG> is defined to be called exactly once. (To understand why, read about the
  -closures at
  -<CODE>perlref</CODE> or <CODE>perlfaq</CODE> 13.12)
  +But, lets back to our world. We are living in a material world, and our
  +bosses pay us to keep the systems running. So if you feel that you cannot
  +provide the support yourself and you do not trust the available free
  +resources, you must get an OS that have behind a company to pay for, and to
  +blame for any difficulties you might experience in hope that your cries for
  +help will be heard and answered. Your boss wants to be able to sue someone
  +if the project has a problem. If you buy a product and the company claims
  +support, then you have someone to sue. You do not have someone to sue other
  +than getting fired yourself if you go with Open Source and it fails.
   
   <P>
  -PERLDIAG manpage says:
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Discontinued_products">Discontinued products</A></H2></CENTER>
  +<P>
  +You have invested a lot into a developing of some proprietary software,
  +that is bundled with the OS you were developing on and for. For example you
  +write some mod_perl handler that takes an advantage of some proprietary
  +features of the OS which make it faster and it will not run on any other
  +OS. Things are under control, the performance is great and you sing from
  +happiness. But... one day the company who wrote your beloved OS went
  +bankrupt, which is not unlikely to happen nowadays. You have got stuck with
  +their last masterpiece and no support! What are you going to do then?
  +Invest more into a porting of the software to another OS...
   
   <P>
  -<PRE>  An inner (nested) named subroutine is referencing a lexical variable
  -  defined in an outer subroutine.
  -</PRE>
  +Everyone can be hit by this mini disaster, so it is better to watch the
  +background of the company when making your choice, but still you never know
  +what will happen in the next minute. The OSes in this hazard group are
  +developed completely by a single companies. Free OSes are probably more
  +promising for a development is distributed between many companies and
  +developers, so if a person who developed a really important part of the
  +kernel lost an interest to continue, someone else will pick up the falling
  +flag and continue from the same place. Of course if tomorrow some better
  +project will show up, developers might migrate there and finally drop the
  +development, but we are here not to let this happen.
  +
   <P>
  -When the inner subroutine is called, it will probably see the value of the
  -outer subroutine's variable as it was before and during the *first* call to
  -the outer subroutine; in this case, after the first call to the outer
  -subroutine is complete, the inner and outer subroutines will no longer
  -share a common value for the variable. In other words, the variable will no
  -longer be shared.
  +But you are the one responsible for making the right decision...
   
   <P>
  -Check your code by running Apache in single-child mode (httpd -X). Since
  -the value of a my variable retain its initial value <CODE>per
  -child process</CODE>, the closure problem can be difficult to track down in multi-user mode. It
  -will appear to work fine until you have cycled through all the httpd
  -children.
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="OS_Releases">OS Releases</A></H2></CENTER>
  +<P>
  +Actively developed OSes are generally tries to keep the pace with the
  +latest technology developments, and all the time optimize the kernel and
  +other parts of OS to become better and faster. Nowadays, Internet and
  +Networking in general are the most hot targets for system developers.
  +Sometimes a simple OS upgrade to a latest stable version, can save you an
  +expensive hardware upgrade. Also, remember that when you buy a new
  +hardware, chances are that latest software will take the most out of it.
  +Since while the existent software (drivers) might support the new product
  +because of its back compatibility with previous products of the same family
  +(brand), it might not take benefits of new features, so the you could spend
  +much less money for the same functionality if you were to buy a previous
  +model of the same product.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H2><A NAME="The_remedy">The remedy</A></H2></CENTER>
  +<CENTER><H1><A NAME="Hardware_Choosing">Hardware Choosing</A></H1></CENTER>
   <P>
  -If a variable needs file scope, use a global variable:
  +While I am not fond of the idea of updating this section of the mod_perl
  +guide every day a new processor or memory type comes out, exactly like with
  +OS choosing guidelines, I will only hint what should you look for and
  +persuade you that sometimes the most expensive machine is not the one which
  +provides the best performance.
   
   <P>
  -<PRE>    use vars qw/$x/;
  -    use CGI qw/param/;
  -    $x = param('x');
  -    sub printit {
  -       print &quot;$x\n&quot;;
  -    }
  -</PRE>
  +Your demands are bound to many aspects and components. Let's discuss some
  +of them.
  +
   <P>
  -You can safely use a <CODE>my()</CODE> scoped variable if its value is constant:
  +In discussion course you might meet some unfamiliar terms, here are some of
  +them:
   
  +<UL>
  +<P><LI>
   <P>
  -<PRE>    use vars qw/$x/;
  -    use CGI qw/param/;
  -    $x = param('x');
  -    my $y = 5;
  -    sub printit {
  -       print &quot;$x, $y\n&quot;;
  -    }
  -</PRE>
  +Clustering - a bunch of machines connected together to perform one big or
  +many small computational tasks in a reasonable time.
  +
  +<P><LI>
   <P>
  -Also see the clarification of <CODE>my()</CODE> vs. <CODE>use vars</CODE> - Ken Williams writes:
  +Balance loading - users can remember only a name of one of your machines -
  +namely of your server, but it cannot stand the heavy load, so you use a
  +clustering approach, distributing the load over a number of machines. The
  +central server, the one users access when they type the name of the
  +service, works as a dispatcher, by redirecting requests to the rest of the
  +machines, sometimes it also collects the results and return them to the
  +users. One of the advantages is that you can take one of the machines down
  +for a repair or upgrade, and your service will still work - the main server
  +will not dispatch the requests to the machine that was taken down. I will
  +just say that there are many load balancing techniques.
   
  +<P><LI>
   <P>
  -<PRE>  Yes, there is quite a bit of difference!  With use vars(), you are
  +NIC - Network Interface Card.
  +
  +<P><LI>
  +<P>
  +RAM - Random Access Memory
  +
  +<P><LI>
  +<P>
  +RAID - META
  +
  +</UL>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Site_s_traffic">Site's traffic</A></H2></CENTER>
  +<P>
  +If you are building a fans' site but want to amaze your friends with
  +mod_perl guest book, an old 486 machine will do. If you are into a serious
  +business, it is very important to build a scalable server, so if your
  +service is successful and becomes popular, you get your server's traffic
  +doubled every few days, you should be ready to add more resources
  +dynamically. While we can define the webserver scalability more precisely,
  +the important thing is to make sure that you can add more power to your
  +<CODE>webserver(s)</CODE> without investing additional money into a
  +software developing (almost, you will need a software to connect your
  +servers if you add more of them). It means that you should choose a
  +hardware/OS that can talk to other machines and become a part of the
  +cluster.
  +
  +<P>
  +From the other hand if you prepare for a big traffic and buy a monster to
  +do the work for you, what happens if your service does not prove to be as
  +successful as you thought it would be. Then you spent too much money and
  +meanwhile there were a new faster processors and other hardware components
  +released, so you loose again.
  +
  +<P>
  +Wisdom and prophecy , that's all it takes :)
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Cash">Cash</A></H2></CENTER>
  +<P>
  +Everybody knows that Internet is a big cash hole, whatever you throw in,
  +hardly ever comes back. This is not always correct, but there is a lot of
  +wisdom in these words. While you have to invest money to build a decent
  +service, it can be cheaper! You can spend as much as 10 times more money on
  +a new strong machine, but to get only a 10% improvement in performance.
  +Remember that processor that was born 4 years ago is still very mighty.
  +
  +<P>
  +If you really need a lot of power do not think about a strong machine
  +(unless you have money to throw away), think about clustering and load
  +balancing. You can probably buy 10 times more older but very cheap machines
  +and have a 8 times more power, then purchasing only one single newest
  +machine. Why is that? Because as I mentioned before generally the
  +performance improve is very marginal while the price is much bigger.
  +Because 10 machines will do a faster Hard Disk IO (Input/Output), then one
  +single machine even if the disk is much faster. Yes, you have more
  +administration overhead, but there is a chance you will have it anyway, for
  +in a short time the machine you have just invested into will not stand the
  +load and you will have to purchase more and to think how to implement the
  +load balancing and file system distribution.
  +
  +<P>
  +Why I am so convinced? Facts! Look at the most used services on the
  +Internet: search engines, email servers and alike - most of them are using
  +the clustering approach. While you are not always notice that, they do it
  +by hiding the real implementation behind the proxy servers.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="IO_performance">IO performance</A></H2></CENTER>
  +<P>
  +If your service is IO bound (does a lot of read/write operations to your
  +disk, remember that relational DataBases are sitting on disk as well) you
  +need a very fast disk. So you should not spend money on Video card and
  +monitor (monochrome card and 14`` B&amp;W will do for server
  +configuration), but to look for the best price/performance disks. Of course
  +you should ask around for a solid firm, whose HDs are not getting corrupted
  +at all. With money in hand you should think about getting a RAID system
  +(RAID is generally a box with many HDs, and it capable to read/write data
  +much faster. and is protected against disk corruptions, for it duplicates
  +the same data over a number of disks, so if one gets corrupted RAID detects
  +it and data is still correct on the duplicated disks.) You must think about
  +RAID or alike systems if you have an enormous data size to serve. (What is
  +enormous data size nowadays?).
  +
  +<P>
  +Ok, we have a fast disk, what's next? You need a fast disk controller. So
  +ether you should use the one coming on your motherboard or you should plug
  +a controller card if the one you have onboard is not good enough.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Memory">Memory</A></H2></CENTER>
  +<P>
  +How much RAM do you need? Nowadays, most chances you will hear: ``Memory is
  +cheap, the more you buy the better''. But how much is enough? The answer
  +pretty straightforward: ``You do not want your machine to swap''. When CPU
  +needs to write something into a memory, but notices that it is already
  +full, it takes the least frequently used memory pages (4k/page on average
  +OS) and swap them out. Swapping out, means copying to the disk into a
  +special partition or file called swap and deleting from the real memory.
  +The another process asks CPU to bring another page, but CPU cannot find a
  +memory page in the RAM, it was just swapped out, so it goes and brings it
  +from the swap (swapping in). If memory is small, the swapping (in/out)
  +happens too frequently, CPU becomes too busy to bring the pages in and out,
  +HD working hard to read write the swapped out pages, and the whole
  +performance is going down. Sometimes your swap partition can become full as
  +well and your system might die.
  +
  +<P>
  +How do you make a decision? You know what is the highest page request rate
  +your service has and how long does an average request processing take. Now
  +you can calculate how many servers do you need. Knowing the how big any of
  +your servers can get, you know how much memory do you need. You probably
  +need less memory that you have calculated if your OS supports memory
  +sharing and you know how to deploy this feature (preloading the modules and
  +scripts at server's startup). Do not forget that other essential system's
  +processes need memory as well, so you should not plan for the webserver
  +only, but to take into an account all processes to be run on your system.
  +Remember that requests can be queued, so if you can afford your client to
  +wait a few moments, while some process gets free to serve it, your numbers
  +will be more correct, since you generally do not have the highest load, but
  +you should be ready to bear the picks. So you need to reserve at least 20%
  +of free memory for a pick situations. Many sites were reported to crash a
  +few moments after some scooping news about them were posted, and unexpected
  +number of requests suddenly came in. If you are about to announce something
  +cool, be aware of possible consequences.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Internet_Connection">Internet Connection</A></H2></CENTER>
  +<P>
  +You have the best hardware you could get, but the service is still
  +crawling. Make sure you have a fast Internet connection. Not _fast_ as your
  +ISP claims it to be, but fast as it should be. The ISP might have a very
  +good connection to the Internet, but to put many clients on the same line,
  +and if these are heavy clients your traffic will have to share the same
  +line, thus the speed is getting down. Think about dedicated connection and
  +make sure it is truly dedicated, trust the ISP but check it!
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Bottlenecks">Bottlenecks</A></H2></CENTER>
  +<P>
  +The most important thing to understand is that you might use the most
  +expensive components, but still get bad performance. Why? Let me introduce
  +you to this annoying term: A bottleneck.
  +
  +<P>
  +A machine is an aggregate of are many small and big components. Each one of
  +them can become a bottleneck. If you have a fast processor but not a great
  +deal of RAM, the processor will be under used waiting for the kernel to
  +swap in and out the memory pages, because memory is too small to fit at
  +least the most used ones. If you have a lot of memory and a fast processor
  +and a fast disk, but a slow controller - the performance will be poor, and
  +you will have wasted the money.
  +
  +<P>
  +Of course use a NIC that does not create a bottleneck. If the NIC is slow,
  +the whole service is slow.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Conclusion">Conclusion</A></H2></CENTER>
  +<P>
  +To use your money optimally, you have either to understand your hardware
  +very well, so you will know what to pick or you should hire a knowledgeable
  +hardware consultant or employee it on a constant basis, since your demands
  +are probably being changed as time goes, and your HW should be adopted to
  +every change you do.
  +
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +	     The <a href="http://www.modperl.com/">
  +	     <B>Writing Apache Modules with Perl and C</B></a>
  +	     book can be purchased online from <a
  +	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  +	     and <a
  +	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  +	     Amazon.com</a>.
  +
  +	     <HR>
  +	     [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]
  +
  +<CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
  +<TR ALIGN=CENTER VALIGN=TOP>
  +  <TD ALIGN=CENTER VALIGN=CENTER COLSPAN="3">
  +	     <HR>
  +  </TD>
  +</TR>
  +<TR ALIGN=CENTER VALIGN=TOP>
  +  <TD ALIGN=CENTER VALIGN=CENTER>
  +    <B>
  +      <FONT SIZE=-1>
  +	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  +	     <BR>Last Modified at 05/17/1999
  +      </FONT>
  +    </B>
  +  </TD>
  +
  +  <TD>
  +	     <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg" ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
  +  </TD>
  +
  +  <TD>
  +    <FONT SIZE=-2>
  +	     Use of the Camel for Perl is <BR>
  +	     a trademark of <A HREF="http://www.ora.com">O'Reilly &amp; Associates</A>,<BR>
  +             and is used by permission. 
  +    </FONT> 
  +  </TD>
  +</TR>
  +</TABLE></CENTER>
  +
  +</BODY>
  +</HTML>
  +	    
  +
  +<HR SIZE=6>
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  +<HTML>
  +<HEAD>
  +   <TITLE>mod_perl guide: Things obvious to others, but not to you</TITLE>
  +   <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
  +   <META NAME="Author" CONTENT="Bekman Stas">
  +   <META NAME="Description" CONTENT="All Apache/Perl related information: Hints, 
  +Guidelines, Scenarios and Troubleshottings">
  +   <META NAME="keywords" CONTENT="mod_perl modperl perl apache cgi webserver speed 
  +fast guide mod_perl apache guide help info faq mod_perl installation cgi
  +troubleshooting help no sex speedup free open source OSS mod_perl apache guide">
  +</HEAD>
  +     <LINK REL=STYLESHEET TYPE="text/css"
  +        HREF="style.css" TITLE="refstyle">
  +     <style type="text/css">
  +     <!-- 
  +        @import url(style.css);
  +     -->
  +     
  +     </style>
  +<BODY TEXT="#000000" BGCOLOR="#E0FFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
  +<A NAME="toc"></A>
  +<H1 ALIGN=CENTER>
  +<A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A>
  +<A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  +Things obvious to others, but not to you</H1>
  +<HR WIDTH="100%">
  +	    [    <A HREF="hardware.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +<P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
  +<UL>
  +
  +	<LI><A HREF="#Coverage">Coverage</A>
  +	<LI><A HREF="#my_scoped_variable_in_nested_s">my() scoped variable in nested subroutines</A>
  +	<UL>
  +
  +		<LI><A HREF="#The_poison">The poison</A>
  +		<LI><A HREF="#The_diagnosis">The diagnosis</A>
  +		<LI><A HREF="#The_remedy">The remedy</A>
  +	</UL>
  +
  +	<LI><A HREF="#Reloading_Modules_and_Required_F">Reloading Modules and Required Files</A>
  +	<UL>
  +
  +		<LI><A HREF="#Restarting_the_server">Restarting the server</A>
  +		<LI><A HREF="#Using_Apache_StatINC">Using Apache::StatINC</A>
  +		<LI><A HREF="#Reloading_only_specific_files">Reloading only specific files</A>
  +	</UL>
  +
  +	<LI><A HREF="#Compiled_Regular_Expressions">Compiled Regular Expressions </A>
  +	<LI><A HREF="#Debugging_your_code_in_Single_Se">Debugging your code in Single Server Mode</A>
  +	<LI><A HREF="#_M_and_other_time_file_tests_u">-M and other time() file tests under mod_perl</A>
  +	<LI><A HREF="#Handling_the_User_pressed_Stop_">Handling the 'User pressed Stop button' case</A>
  +	<LI><A HREF="#Handling_the_server_timeout_case">Handling the server timeout cases</A>
  +	<LI><A HREF="#Where_do_the_warnings_errors_go_">Where do the warnings/errors go?</A>
  +	<LI><A HREF="#Setting_environment_variables_fo">Setting environment variables for scripts called from CGI.</A>
  +</UL>
  +<!-- INDEX END -->
  +
  +<HR>
  +
  +	     The <a href="http://www.modperl.com/">
  +	     <B>Writing Apache Modules with Perl and C</B></a>
  +	     book can be purchased online from <a
  +	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  +	     and <a
  +	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  +	     Amazon.com</a>.
  +
  +	     <HR>
  +
  +	      <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<P>
  +<CENTER><H1><A NAME="Coverage">Coverage</A></H1></CENTER>
  +<P>
  +This document describes ``special'' traps you may encounter when running
  +your plain CGIs under Apache::Registry and Apache::PerlRun.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="my_scoped_variable_in_nested_s">my() scoped variable in nested subroutines</A></H1></CENTER>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="The_poison">The poison</A></H2></CENTER>
  +<P>
  +In a non modperl script (stand alone or CGI), there is no problem writing
  +code like this:
  +
  +<P>
  +<PRE>    use CGI qw/param/;
  +    my $x = param('x');
  +    sub printit {
  +       print &quot;$x\n&quot;;
  +    }
  +</PRE>
  +<P>
  +However, the script is run under Apache::Registry, it will in fact be
  +repackaged into something like this:
  +
  +<P>
  +<PRE>  package $mangled_package_name;
  +  sub handler {
  +    #line1 $original_filename
  +    use CGI qw/param/;
  +    my $x = param('x');
  +    sub printit {
  +       print &quot;$x\n&quot;;
  +    }
  +  }
  +</PRE>
  +<P>
  +Now <CODE>printit</CODE> is an inner named subroutine. Because it is referencing a lexical variable
  +from an enclosing scope, a closure is created.
  +
  +<P>
  +The first time the script is run, the correct value of <CODE>$x</CODE> will
  +be printed. However on subsequent runs, <CODE>printit</CODE> will retain the initial value of <CODE>$x</CODE> -- not what you want.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="The_diagnosis">The diagnosis</A></H2></CENTER>
  +<P>
  +Always use -w (or/and PerlWarn ON)! Perl will then emit a warning like:
  +
  +<P>
  +<PRE>  Value of $x will not stay shared at - line 5.
  +</PRE>
  +<P>
  +NOTE: Subroutines defined inside <STRONG>BEGIN{}</STRONG> and <STRONG>END{}</STRONG> cannot trigger this message, since each <STRONG>BEGIN{}</STRONG> and <STRONG>END{}</STRONG> is defined to be called exactly once. (To understand why, read about the
  +closures at
  +<CODE>perlref</CODE> or <CODE>perlfaq</CODE> 13.12)
  +
  +<P>
  +PERLDIAG manpage says:
  +
  +<P>
  +<PRE>  An inner (nested) named subroutine is referencing a lexical variable
  +  defined in an outer subroutine.
  +</PRE>
  +<P>
  +When the inner subroutine is called, it will probably see the value of the
  +outer subroutine's variable as it was before and during the *first* call to
  +the outer subroutine; in this case, after the first call to the outer
  +subroutine is complete, the inner and outer subroutines will no longer
  +share a common value for the variable. In other words, the variable will no
  +longer be shared.
  +
  +<P>
  +Check your code by running Apache in single-child mode (httpd -X). Since
  +the value of a my variable retain its initial value <CODE>per
  +child process</CODE>, the closure problem can be difficult to track down in multi-user mode. It
  +will appear to work fine until you have cycled through all the httpd
  +children.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="The_remedy">The remedy</A></H2></CENTER>
  +<P>
  +If a variable needs file scope, use a global variable:
  +
  +<P>
  +<PRE>    use vars qw/$x/;
  +    use CGI qw/param/;
  +    $x = param('x');
  +    sub printit {
  +       print &quot;$x\n&quot;;
  +    }
  +</PRE>
  +<P>
  +You can safely use a <CODE>my()</CODE> scoped variable if its value is constant:
  +
  +<P>
  +<PRE>    use vars qw/$x/;
  +    use CGI qw/param/;
  +    $x = param('x');
  +    my $y = 5;
  +    sub printit {
  +       print &quot;$x, $y\n&quot;;
  +    }
  +</PRE>
  +<P>
  +Also see the clarification of <CODE>my()</CODE> vs. <CODE>use vars</CODE> - Ken Williams writes:
  +
  +<P>
  +<PRE>  Yes, there is quite a bit of difference!  With use vars(), you are
     making an entry in the symbol table, and you are telling the
     compiler that you are going to be referencing that entry without an
     explicit package name.
  @@ -8175,7 +8930,7 @@
   
   <P>
   <PRE>  open(PUBLISH, &quot;GATEWAY_INTERFACE=CGI/1.1 ; script.cgi
  -       \&quot;param1=value1&amp;param2=value2\&quot; |&quot;) or die &quot;...: $!\n&quot;;
  +       &quot;param1=value1&amp;param2=value2&quot; |&quot;) or die &quot;...: $!\n&quot;;
   </PRE>
   <P>
   Make sure, that the parameters you pass are shell safe (All ``unsafe''
  @@ -8197,7 +8952,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]
  +	     [    <A HREF="hardware.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  @@ -8261,7 +9016,7 @@
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
   Warnings and Errors: Where and Why.</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="security.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  @@ -8653,7 +9408,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]
  +	     [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="security.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  @@ -8693,6 +9448,275 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
   <HTML>
   <HEAD>
  +   <TITLE>mod_perl guide: Protecting Your Site</TITLE>
  +   <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
  +   <META NAME="Author" CONTENT="Bekman Stas">
  +   <META NAME="Description" CONTENT="All Apache/Perl related information: Hints, 
  +Guidelines, Scenarios and Troubleshottings">
  +   <META NAME="keywords" CONTENT="mod_perl modperl perl apache cgi webserver speed 
  +fast guide mod_perl apache guide help info faq mod_perl installation cgi
  +troubleshooting help no sex speedup free open source OSS mod_perl apache guide">
  +</HEAD>
  +     <LINK REL=STYLESHEET TYPE="text/css"
  +        HREF="style.css" TITLE="refstyle">
  +     <style type="text/css">
  +     <!-- 
  +        @import url(style.css);
  +     -->
  +     
  +     </style>
  +<BODY TEXT="#000000" BGCOLOR="#E0FFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
  +<A NAME="toc"></A>
  +<H1 ALIGN=CENTER>
  +<A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A>
  +<A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  +Protecting Your Site</H1>
  +<HR WIDTH="100%">
  +	    [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +<P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
  +<UL>
  +
  +	<LI><A HREF="#An_Importance_of_Your_site_s_Sec">An Importance of Your site's Security</A>
  +	<LI><A HREF="#Illustrated_security_scenarios">Illustrated security scenarios</A>
  +	<UL>
  +
  +		<LI><A HREF="#Non_authenticated_access_for_int">Non authenticated access for internal IPs, but authenticated by external IPs</A>
  +	</UL>
  +
  +</UL>
  +<!-- INDEX END -->
  +
  +<HR>
  +
  +	     The <a href="http://www.modperl.com/">
  +	     <B>Writing Apache Modules with Perl and C</B></a>
  +	     book can be purchased online from <a
  +	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  +	     and <a
  +	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  +	     Amazon.com</a>.
  +
  +	     <HR>
  +
  +	      <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<P>
  +<CENTER><H1><A NAME="An_Importance_of_Your_site_s_Sec">An Importance of Your site's Security</A></H1></CENTER>
  +<P>
  +Lets state it, your site or service can easily become a target for some
  +Internet ``terrorists'', for something that you said, because of success
  +your site has, or for no obvious reason. Your site can be broken in, the
  +whole data can be deleted, some important information can be stolen, or a
  +much easier the site can be turned into a useless with a _simple_ Services
  +Deny Attack. What can you do about it? Protect yourself! Whatever you do,
  +your site will be still vulnerable as long as you are connected to the
  +network. Cut the connections down, turn off your machine and put it into a
  +safe - now it is more protected, but very useless.
  +
  +<P>
  +Let's first get acquainted with security related terminology:
  +
  +<DL>
  +<P><DT><STRONG><A NAME="item_Authentication">Authentication</A></STRONG><DD>
  +<P>
  +When you want to make sure that a user is the one he claims to be, you
  +generally ask her for a username and a password, right? Once you have both:
  +the username and the password, you can validate them in your database of
  +username/password pairs, and if both match - you know that user has passed
  +the <STRONG>Authentication</STRONG> stage. From this moment on if you keep the session open all you need is to
  +remember the username.
  +
  +<P><DT><STRONG><A NAME="item_Authorization">Authorization</A></STRONG><DD>
  +<P>
  +You might want to let user <STRONG>foo</STRONG> to access to some resource, but restrict her from accessing to another
  +resource, which in turn is accessible only for user <STRONG>bar</STRONG>. The process of checking access rights is being called <STRONG>Authorization</STRONG>. For <STRONG>Authorization</STRONG> all you need is a username or some other attribute you authorize upon. For
  +example you can authorize upon IP number, for example allowing only your
  +local users to use some service. Be warned that IP numbers or session_ids
  +can be spoofed, and that is why you would not do <STRONG>Authorization</STRONG>
  +without <STRONG>Authentication</STRONG>.
  +
  +<P>
  +Actually you are familiar with both terms for a long time - when you telnet
  +to your account on some machine you go through a login process (<STRONG>Authentication</STRONG>). When you try to read some file on your file systems the kernel checks
  +first the permissions on this file. (you go through <STRONG>Authorization</STRONG>). That's why you could hear about <STRONG>Access
  +control</STRONG> which is another name for the same term.
  +
  +</DL>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Illustrated_security_scenarios">Illustrated security scenarios</A></H1></CENTER>
  +<P>
  +I am going to present some real world security requirements and their
  +implementations.
  +
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Non_authenticated_access_for_int">Non authenticated access for internal IPs, but authenticated by external IPs</A></H2></CENTER>
  +<P>
  +If you run an <STRONG>Extranet</STRONG> (Very similar to <STRONG>Intranet</STRONG> but partly accessible from the outside, e.g. read only) you might want to
  +let your internal users an non-restricted access to your web server, but if
  +these users are calling from the outside of your organization you want to
  +make sure these are your employees.
  +
  +<P>
  +First one is achieved very simply using the IP patterns of the organization
  +in a Perl Access Handler in an <CODE>.htaccess file</CODE>, which consequently sets the REMOTE_USER environmental variable to a
  +generic organization's username, so that certain scripts which rely on
  +<CODE>REMOTE_USER</CODE> environment variable will work properly.
  +
  +<P>
  +The second one should detect that the IP comes from the outside and user
  +should be authenticated, before allowed in.
  +
  +<P>
  +As you understood this is a pure authentication problem. Once user passes
  +the authentication, either bypassing it because of his IP address, or after
  +entering correct login/password pair, the
  +<CODE>REMOTE_USER</CODE> variable is being set. Now having it set we can talk about authorization.
  +
  +<P>
  +OK let's see the implementation. First we modify the &lt;httpd.conf&gt;:
  +
  +<P>
  +<PRE>  PerlModule My::Auth
  +  
  +  &lt;Location /private&gt;
  +    PerlAccessHandler My::Auth::access_handler
  +    PerlSetVar Intranet &quot;100.100.100.1 =&gt; userA, 100.100.100.2 =&gt; userB&quot;
  +    PerlAuthenHandler My::Auth::authen_handler
  +    AuthName realm
  +    AuthType Basic
  +    Require valid-user
  +  &lt;/Location&gt;
  +</PRE>
  +<P>
  +Now the code of My/Auth.pm:
  +
  +<P>
  +<PRE>    sub access_handler {
  +</PRE>
  +<P>
  +<PRE>        my $r = shift;
  +</PRE>
  +<P>
  +<PRE>        unless ($r-&gt;some_auth_required) {
  +                $r-&gt;log_reason(&quot;No authentication has been configured&quot;);
  +                return FORBIDDEN;
  +        }
  +        # get list of IP addresses
  +        my %ips = split /\s*(?:=&gt;|,)\s*/, $r-&gt;dir_config(&quot;Intranet&quot;);
  +</PRE>
  +<P>
  +<PRE>        if (my $user = $ips{$r-&gt;connection-&gt;remote_ip}) {
  +</PRE>
  +<P>
  +<PRE>                # update connection record
  +                $r-&gt;connection-&gt;user($user);
  +</PRE>
  +<P>
  +<PRE>                # do not ask for a password
  +                $r-&gt;set_handlers(PerlAuthenHandler =&gt; [\&amp;OK]);
  +        }
  +        return OK;
  +    }
  +    
  +    sub authen_handler {
  +</PRE>
  +<P>
  +<PRE>        my $r = shift;
  +</PRE>
  +<P>
  +<PRE>        # get user's authentication credentials
  +        my ($res, $sent_pw) = $r-&gt;get_basic_auth_pw;
  +        return $res if $res != OK;
  +        my $user = $r-&gt;connection-&gt;user;
  +</PRE>
  +<P>
  +<PRE>        # authenticate through DBI
  +        my $reason = authen_dbi ($r, $user, $sent_pw, $niveau);
  +</PRE>
  +<P>
  +<PRE>        if ($reason) {
  +                $r-&gt;note_basic_auth_failure;
  +                $r-&gt;log_reason ($reason, $r-&gt;uri);
  +                return AUTH_REQUIRED;
  +        }
  +        return OK;
  +    }
  +    
  +    sub authen_dbi{
  +      my ($r, $user, $sent_pw, $niveau) = @_;
  +</PRE>
  +<P>
  +<PRE>      # validate username/passwd
  +</PRE>
  +<P>
  +<PRE>      return 0 if (*PASSED*)
  +        
  +      return &quot;Failed for X reason&quot;;
  +</PRE>
  +<P>
  +<PRE>    }
  +</PRE>
  +<P>
  +Either implement your <CODE>authen_dbi()</CODE> routine, or replace
  +<CODE>authen_handler()</CODE> with any authentication handler such as
  +<CODE>Apache::AuthenDBI</CODE>.
  +
  +<P>
  +<CODE>access_handler()</CODE> sets <CODE>REMOTE_USER</CODE> to be either <CODE>userA</CODE> or
  +<CODE>userB</CODE> according on the IP, if non matched <CODE>PerlAuthenHandler</CODE> will be not set to OK, and the next Authentication stage will ask the user
  +for a login and password.
  +
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +	     The <a href="http://www.modperl.com/">
  +	     <B>Writing Apache Modules with Perl and C</B></a>
  +	     book can be purchased online from <a
  +	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  +	     and <a
  +	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  +	     Amazon.com</a>.
  +
  +	     <HR>
  +	     [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]
  +
  +<CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
  +<TR ALIGN=CENTER VALIGN=TOP>
  +  <TD ALIGN=CENTER VALIGN=CENTER COLSPAN="3">
  +	     <HR>
  +  </TD>
  +</TR>
  +<TR ALIGN=CENTER VALIGN=TOP>
  +  <TD ALIGN=CENTER VALIGN=CENTER>
  +    <B>
  +      <FONT SIZE=-1>
  +	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  +	     <BR>Last Modified at 05/17/1999
  +      </FONT>
  +    </B>
  +  </TD>
  +
  +  <TD>
  +	     <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg" ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
  +  </TD>
  +
  +  <TD>
  +    <FONT SIZE=-2>
  +	     Use of the Camel for Perl is <BR>
  +	     a trademark of <A HREF="http://www.ora.com">O'Reilly &amp; Associates</A>,<BR>
  +             and is used by permission. 
  +    </FONT> 
  +  </TD>
  +</TR>
  +</TABLE></CENTER>
  +
  +</BODY>
  +</HTML>
  +	    
  +
  +<HR SIZE=6>
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  +<HTML>
  +<HEAD>
      <TITLE>mod_perl guide: mod_perl and Relational Databases</TITLE>
      <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
      <META NAME="Author" CONTENT="Bekman Stas">
  @@ -8717,7 +9741,7 @@
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
   mod_perl and Relational Databases</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="security.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  @@ -9789,7 +10813,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]
  +	     [    <A HREF="security.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  @@ -10075,7 +11099,7 @@
     
     BEGIN {
         # RCS/CVS complient:  must be all one line, for MakeMaker
  -    $DB_File::Wrap::VERSION = do { my @r = (q$Revision: 1.11 $ =~ /\d+/g); sprintf &quot;%d.&quot;.&quot;%02d&quot; x $#r, @r };
  +    $DB_File::Wrap::VERSION = do { my @r = (q$Revision: 1.12 $ =~ /\d+/g); sprintf &quot;%d.&quot;.&quot;%02d&quot; x $#r, @r };
     
     }
     
  @@ -12014,7 +13038,7 @@
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  -	<LI><A HREF="#Preventing_QUERY_STRING_to_get_c">Preventing QUERY_STRING to get corrupted with &amp;entity key names.</A>
  +	<LI><A HREF="#Preventing_QUERY_STRING_from_get">Preventing QUERY_STRING from getting corrupted because of &amp;entity key names.</A>
   	<LI><A HREF="#IE_4_x_does_not_re_post_data_to_">IE 4.x does not re-post data to a non-port-80 URL</A>
   </UL>
   <!-- INDEX END -->
  @@ -12033,7 +13057,7 @@
   
   	      <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P>
  -<CENTER><H1><A NAME="Preventing_QUERY_STRING_to_get_c">Preventing QUERY_STRING to get corrupted with &amp;entity key names.</A></H1></CENTER>
  +<CENTER><H1><A NAME="Preventing_QUERY_STRING_from_get">Preventing QUERY_STRING from getting corrupted because of &amp;entity key names.</A></H1></CENTER>
   <P>
   In URL <CODE>http://my.site.com/foo.pl?foo=bar&amp;reg=foobar</CODE> , some browsers will interpret <CODE>&amp;reg</CODE> as a magic entity, and encode it as it was
   <CODE>&amp;reg;</CODE>, which will result in a corrupted <CODE>QUERY_STRING</CODE>. If you encounter this problem you should either avoid using such a keys
  @@ -12043,6 +13067,11 @@
   <CODE>http://my.site.com/foo.pl?foo=bar;reg=foobar</CODE>.
   
   <P>
  +Note that this is only an issue when you are building your own URLs with
  +query strings, it is not a problem when the URL is the result of submitting
  +a form because the browsers _have_ to get that right.
  +
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="IE_4_x_does_not_re_post_data_to_">IE 4.x does not re-post data to a non-port-80 URL</A></H1></CENTER>
   <P>
  @@ -12078,7 +13107,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  @@ -12953,7 +13982,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 04/19/1999
  +	     <BR>Last Modified at 05/17/1999
         </FONT>
       </B>
     </TD>
  @@ -13015,6 +14044,7 @@
   	<LI><A HREF="#Get_helped_with_Perl_CGI">Get helped with Perl/CGI</A>
   	<LI><A HREF="#Get_helped_with_Apache">Get helped with Apache </A>
   	<LI><A HREF="#Get_helped_with_DBI">Get helped with DBI</A>
  +	<LI><A HREF="#Get_helped_with_Squid_Internet">Get helped with Squid - Internet Object Cache</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -13139,8 +14169,8 @@
   </PRE>
   <P>
   A <STRONG>searchable</STRONG> mod_perl mailing list archive available at <A
  -HREF="http://forum.swarthmore.edu/epigone/modperl.">http://forum.swarthmore.edu/epigone/modperl.</A>
  -We owe it to Ken Williams.  
  +HREF="http://forum.swarthmore.edu/epigone/modperl">http://forum.swarthmore.edu/epigone/modperl</A>
  +. We owe it to Ken Williams.
   
   <P>
   Another arhive: <A
  @@ -13272,7 +14302,34 @@
   
   
   </UL>
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Get_helped_with_Squid_Internet">Get helped with Squid - Internet Object Cache</A></H1></CENTER>
  +<UL>
  +<P><LI>
  +<P>
  +Home page - <A HREF="http://squid.nlanr.net/">http://squid.nlanr.net/</A>
  +
  +<P><LI>
  +<P>
  +FAQ - <A
  +HREF="http://squid.nlanr.net/Squid/FAQ/FAQ.html">http://squid.nlanr.net/Squid/FAQ/FAQ.html</A>
  +
  +
  +<P><LI>
  +<P>
  +Users Guide - <A
  +HREF="http://squid.nlanr.net/Squid/Users-Guide/">http://squid.nlanr.net/Squid/Users-Guide/</A>
  +
  +
  +<P><LI>
  +<P>
  +Mailing lists - <A
  +HREF="http://squid.nlanr.net/Squid/mailing-lists.html">http://squid.nlanr.net/Squid/mailing-lists.html</A>
  +
  +
  +</UL>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
   	     book can be purchased online from <a
  @@ -13295,7 +14352,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 04/30/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  @@ -13354,8 +14411,8 @@
   	<LI><A HREF="#perl">perl</A>
   	<LI><A HREF="#apache">apache</A>
   	<LI><A HREF="#mod_perl">mod_perl</A>
  -	<LI><A HREF="#Squid">Squid</A>
  -	<LI><A HREF="#thttpd">thttpd</A>
  +	<LI><A HREF="#Squid_Internet_Object_Cache">Squid - Internet Object Cache</A>
  +	<LI><A HREF="#thttpd_tiny_turbo_throttling_H">thttpd - tiny/turbo/throttling HTTP server</A>
   	<LI><A HREF="#mod_proxy_add_forward">mod_proxy_add_forward</A>
   </UL>
   <!-- INDEX END -->
  @@ -13411,15 +14468,22 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="Squid">Squid</A></H1></CENTER>
  +<CENTER><H1><A NAME="Squid_Internet_Object_Cache">Squid - Internet Object Cache</A></H1></CENTER>
  +<P>
  +<A HREF="http://squid.nlanr.net/">http://squid.nlanr.net/</A>
  +
   <P>
  -&lt;META&gt;
  +Squid Linux 2.x Redhat RPMs : <A
  +HREF="http://home.earthlink.net/~intrep/linux/">http://home.earthlink.net/~intrep/linux/</A>
  +
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="thttpd">thttpd</A></H1></CENTER>
  +<CENTER><H1><A NAME="thttpd_tiny_turbo_throttling_H">thttpd - tiny/turbo/throttling HTTP server</A></H1></CENTER>
   <P>
  -&lt;META&gt;
  +<A
  +HREF="http://www.acme.com/software/thttpd/">http://www.acme.com/software/thttpd/</A>
  +
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -13455,7 +14519,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.2       +8 -3      modperl-site/guide/browserbugs.html
  
  Index: browserbugs.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/browserbugs.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- browserbugs.html	1999/05/08 18:04:22	1.1
  +++ browserbugs.html	1999/05/17 20:47:31	1.2
  @@ -29,7 +29,7 @@
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  -	<LI><A HREF="#Preventing_QUERY_STRING_to_get_c">Preventing QUERY_STRING to get corrupted with &amp;entity key names.</A>
  +	<LI><A HREF="#Preventing_QUERY_STRING_from_get">Preventing QUERY_STRING from getting corrupted because of &amp;entity key names.</A>
   	<LI><A HREF="#IE_4_x_does_not_re_post_data_to_">IE 4.x does not re-post data to a non-port-80 URL</A>
   </UL>
   <!-- INDEX END -->
  @@ -48,7 +48,7 @@
   
   	      <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P>
  -<CENTER><H1><A NAME="Preventing_QUERY_STRING_to_get_c">Preventing QUERY_STRING to get corrupted with &amp;entity key names.</A></H1></CENTER>
  +<CENTER><H1><A NAME="Preventing_QUERY_STRING_from_get">Preventing QUERY_STRING from getting corrupted because of &amp;entity key names.</A></H1></CENTER>
   <P>
   In URL <CODE>http://my.site.com/foo.pl?foo=bar&amp;reg=foobar</CODE> , some browsers will interpret <CODE>&amp;reg</CODE> as a magic entity, and encode it as it was
   <CODE>&amp;reg;</CODE>, which will result in a corrupted <CODE>QUERY_STRING</CODE>. If you encounter this problem you should either avoid using such a keys
  @@ -58,6 +58,11 @@
   <CODE>http://my.site.com/foo.pl?foo=bar;reg=foobar</CODE>.
   
   <P>
  +Note that this is only an issue when you are building your own URLs with
  +query strings, it is not a problem when the URL is the result of submitting
  +a form because the browsers _have_ to get that right.
  +
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="IE_4_x_does_not_re_post_data_to_">IE 4.x does not re-post data to a non-port-80 URL</A></H1></CENTER>
   <P>
  @@ -93,7 +98,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.13      +92 -2     modperl-site/guide/config.html
  
  Index: config.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/config.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- config.html	1999/05/08 17:46:29	1.12
  +++ config.html	1999/05/17 20:47:31	1.13
  @@ -36,6 +36,7 @@
   		<LI><A HREF="#Location_Configuration">Location Configuration</A>
   		<LI><A HREF="#PerlFreshRestart">PerlFreshRestart</A>
   		<LI><A HREF="#_perl_status_location">/perl-status location</A>
  +		<LI><A HREF="#PerlSetVar_PerlSetEnv_and_PerlP">PerlSetVar, PerlSetEnv and PerlPassEnv</A>
   		<LI><A HREF="#perl_startup_file">perl-startup file</A>
   		<UL>
   
  @@ -46,6 +47,7 @@
   
   	</UL>
   
  +	<LI><A HREF="#Running_apachectl_configtest_o">Running 'apachectl configtest' or 'httpd -t'</A>
   	<LI><A HREF="#Perl_behavior_controls">Perl behavior controls</A>
   	<LI><A HREF="#Tuning_MinSpareServers_MaxSpareS">Tuning MinSpareServers MaxSpareServers StartServers MaxClients</A>
   	<LI><A HREF="#Publishing_port_numbers_differen">Publishing port numbers different from 80</A>
  @@ -62,6 +64,7 @@
   		<LI><A HREF="#the_server_no_longer_retrieves_t">the server no longer retrieves the DirectoryIndex files for a directory</A>
   	</UL>
   
  +	<LI><A HREF="#Configuration_Security_Concerns">Configuration Security Concerns</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -179,7 +182,9 @@
   <P>
   <STRONG>PerlSendHeader On</STRONG> tells the server to send an HTTP header to the browser on every script
   invocation. You will want to turn this off for nph (non-parsed-headers)
  -scripts.
  +scripts. <CODE>PerlSendHeader On</CODE> means to call <CODE>ap_send_http_header()</CODE> after parsing your script
  +headers. It is only meant for CGI emulation, its always better to use
  +CGI-&gt;header or $r-&gt;send_http_header directly.
   
   <P>
   Remember the <STRONG>Alias</STRONG> from the section above? We must use the same Alias here, if you use
  @@ -239,6 +244,30 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="PerlSetVar_PerlSetEnv_and_PerlP">PerlSetVar, PerlSetEnv and PerlPassEnv</A></H2></CENTER>
  +<P>
  +<PRE>  PerlSetEnv key val
  +  PerlPassEnv key
  +</PRE>
  +<P>
  +Set and Pass the ENV variables to your scripts. So you can read them in
  +your scripts from <CODE>%ENV</CODE> (e.g. <CODE>$ENV{&quot;key&quot;}</CODE>)
  +
  +<P>
  +<CODE>PerlSetVar</CODE> is very similar to <CODE>PerlSetEnv</CODE>, but you extract it with another method. In &lt;Perl&gt; sections:
  +
  +<P>
  +<PRE>  push @{ $Location{&quot;/&quot;}-&gt;{PerlSetVar} }, [ 'FOO' =&gt; BAR ];
  +</PRE>
  +<P>
  +and in the code you read it with:
  +
  +<P>
  +<PRE>  my $r = Apache-&gt;request;
  +  print $r-&gt;dir_config('FOO');
  +</PRE>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="perl_startup_file">perl-startup file</A></H2></CENTER>
   <P>
   Since many times you have to add many perl directives to the configuration
  @@ -323,6 +352,34 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Running_apachectl_configtest_o">Running 'apachectl configtest' or 'httpd -t'</A></H1></CENTER>
  +<P>
  +<CODE>apachectl configtest</CODE> tests the configuration file without starting the server. You can safely
  +modify the configuration file on your production server, if you run this
  +test before you restart the server. Of course it is not 100% errorprone,
  +but it will reveal any syntaxical errors you might do while editing the
  +file.
  +
  +<P>
  +<CODE>apachectl configtest</CODE> is the same as <CODE>httpd -t</CODE> and it actually executes the code in startup.pl, not just parses it. &lt;Perl&gt; configuration has always started Perl during the configuration
  +read,
  +<CODE>Perl{Require,Module}</CODE> do so as well.
  +
  +<P>
  +If you want your startup code to get a control over the <CODE>-t</CODE>
  +(configtest) server launch, start the server configuration test with 
  +
  +<P>
  +<PRE>  httpd -t -Dsyntax_check
  +</PRE>
  +<P>
  +and in your startup file, add:
  +
  +<P>
  +<PRE>  return if Apache-&gt;define('syntax_check');
  +</PRE>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Perl_behavior_controls">Perl behavior controls</A></H1></CENTER>
   <P>
   For <STRONG>PerlWarn</STRONG> and <STRONG>PerlTaintCheck</STRONG> see <A HREF="././porting.html#Switches_w_T">Switches -w, -T</A>
  @@ -669,6 +726,39 @@
   problem has gone away after placing the usage of mod_perl in a
   &lt;File&gt;- section.
   
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Configuration_Security_Concerns">Configuration Security Concerns</A></H1></CENTER>
  +<P>
  +It is better not to advertise the port mod_perl server running at to the
  +outside world for it creates a potential security risk by revealing which
  +<CODE>module(s)</CODE> and/or OS you are running your web server on.
  +
  +<P>
  +The more modules you have in your web server, the more complex the code in
  +your webserver.
  +
  +<P>
  +The more complex the code in your web server, the more chances for bugs.
  +
  +<P>
  +The more chance for bugs, the more chance that some of those bugs may
  +involve security.
  +
  +<P>
  +Never was completely sure why the default of the ServerToken directive in
  +Apache is Full rather than Minimal. Seems like you would only make it full
  +if you are debugging.
  +
  +<P>
  +For more information see <A HREF="././config.html#Publishing_port_numbers_differen">Publishing port numbers different from 80</A>
  +
  +
  +
  +<P>
  +Another approach is to modify httpd sources to reveal no unwanted
  +information, so if you know the port the <CODE>HEAD</CODE> request will return an empty or phony <CODE>Server:</CODE> field.
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
  @@ -692,7 +782,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.2       +2 -2      modperl-site/guide/databases.html
  
  Index: databases.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/databases.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- databases.html	1999/05/08 18:04:23	1.1
  +++ databases.html	1999/05/17 20:47:31	1.2
  @@ -25,7 +25,7 @@
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
   mod_perl and Relational Databases</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="security.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  @@ -1097,7 +1097,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]
  +	     [    <A HREF="security.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="dbm.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  
  
  
  1.2       +0 -0      modperl-site/guide/dbm.html
  
  Index: dbm.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/dbm.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- dbm.html	1999/05/08 18:04:23	1.1
  +++ dbm.html	1999/05/17 20:47:32	1.2
  @@ -247,7 +247,7 @@
     
     BEGIN {
         # RCS/CVS complient:  must be all one line, for MakeMaker
  -    $DB_File::Wrap::VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\d+/g); sprintf &quot;%d.&quot;.&quot;%02d&quot; x $#r, @r };
  +    $DB_File::Wrap::VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf &quot;%d.&quot;.&quot;%02d&quot; x $#r, @r };
     
     }
     
  
  
  
  1.2       +14 -7     modperl-site/guide/download.html
  
  Index: download.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/download.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- download.html	1999/05/08 18:10:19	1.1
  +++ download.html	1999/05/17 20:47:32	1.2
  @@ -33,8 +33,8 @@
   	<LI><A HREF="#perl">perl</A>
   	<LI><A HREF="#apache">apache</A>
   	<LI><A HREF="#mod_perl">mod_perl</A>
  -	<LI><A HREF="#Squid">Squid</A>
  -	<LI><A HREF="#thttpd">thttpd</A>
  +	<LI><A HREF="#Squid_Internet_Object_Cache">Squid - Internet Object Cache</A>
  +	<LI><A HREF="#thttpd_tiny_turbo_throttling_H">thttpd - tiny/turbo/throttling HTTP server</A>
   	<LI><A HREF="#mod_proxy_add_forward">mod_proxy_add_forward</A>
   </UL>
   <!-- INDEX END -->
  @@ -90,15 +90,22 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="Squid">Squid</A></H1></CENTER>
  +<CENTER><H1><A NAME="Squid_Internet_Object_Cache">Squid - Internet Object Cache</A></H1></CENTER>
   <P>
  -&lt;META&gt;
  +<A HREF="http://squid.nlanr.net/">http://squid.nlanr.net/</A>
   
   <P>
  +Squid Linux 2.x Redhat RPMs : <A
  +HREF="http://home.earthlink.net/~intrep/linux/">http://home.earthlink.net/~intrep/linux/</A>
  +
  +
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="thttpd">thttpd</A></H1></CENTER>
  +<CENTER><H1><A NAME="thttpd_tiny_turbo_throttling_H">thttpd - tiny/turbo/throttling HTTP server</A></H1></CENTER>
   <P>
  -&lt;META&gt;
  +<A
  +HREF="http://www.acme.com/software/thttpd/">http://www.acme.com/software/thttpd/</A>
  +
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -134,7 +141,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.5       +642 -558  modperl-site/guide/guide-src.tar.gz
  
  	<<Binary file>>
  
  
  1.6       +1182 -1071modperl-site/guide/guide.tar.gz
  
  	<<Binary file>>
  
  
  1.12      +31 -3     modperl-site/guide/help.html
  
  Index: help.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/help.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- help.html	1999/05/08 17:46:31	1.11
  +++ help.html	1999/05/17 20:47:36	1.12
  @@ -36,6 +36,7 @@
   	<LI><A HREF="#Get_helped_with_Perl_CGI">Get helped with Perl/CGI</A>
   	<LI><A HREF="#Get_helped_with_Apache">Get helped with Apache </A>
   	<LI><A HREF="#Get_helped_with_DBI">Get helped with DBI</A>
  +	<LI><A HREF="#Get_helped_with_Squid_Internet">Get helped with Squid - Internet Object Cache</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -160,8 +161,8 @@
   </PRE>
   <P>
   A <STRONG>searchable</STRONG> mod_perl mailing list archive available at <A
  -HREF="http://forum.swarthmore.edu/epigone/modperl.">http://forum.swarthmore.edu/epigone/modperl.</A>
  -We owe it to Ken Williams.  
  +HREF="http://forum.swarthmore.edu/epigone/modperl">http://forum.swarthmore.edu/epigone/modperl</A>
  +. We owe it to Ken Williams.
   
   <P>
   Another arhive: <A
  @@ -293,6 +294,33 @@
   
   
   </UL>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Get_helped_with_Squid_Internet">Get helped with Squid - Internet Object Cache</A></H1></CENTER>
  +<UL>
  +<P><LI>
  +<P>
  +Home page - <A HREF="http://squid.nlanr.net/">http://squid.nlanr.net/</A>
  +
  +<P><LI>
  +<P>
  +FAQ - <A
  +HREF="http://squid.nlanr.net/Squid/FAQ/FAQ.html">http://squid.nlanr.net/Squid/FAQ/FAQ.html</A>
  +
  +
  +<P><LI>
  +<P>
  +Users Guide - <A
  +HREF="http://squid.nlanr.net/Squid/Users-Guide/">http://squid.nlanr.net/Squid/Users-Guide/</A>
  +
  +
  +<P><LI>
  +<P>
  +Mailing lists - <A
  +HREF="http://squid.nlanr.net/Squid/mailing-lists.html">http://squid.nlanr.net/Squid/mailing-lists.html</A>
  +
  +
  +</UL>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
  @@ -316,7 +344,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 04/30/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.15      +62 -10    modperl-site/guide/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/index.html,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- index.html	1999/05/08 17:46:31	1.14
  +++ index.html	1999/05/17 20:47:36	1.15
  @@ -27,12 +27,17 @@
   <CENTER><P><B>Deploying mod_perl technology to give a rocket speed
   to your CGI/perl scripts.</B></P></CENTER>
   
  -<CENTER><P><B>Version 1.10
  - May, 8 1999</B></P></CENTER>
  +<CENTER><P><B>Version 1.11
  + May, 17 1999</B></P></CENTER>
    
   <P>
   <HR WIDTH="100%"></P>
   
  +<B>Mirror readers</B>: Make sure you read <A
  +HREF="http://perl.apache.org/guide"> the latest copy</A>.
  +
  +<HR WIDTH="100%"></P>
  +
   <H3>Table of Contents:</H3>
   
   <UL>
  @@ -41,7 +46,7 @@
   <UL>
   
   	<LI><A HREF="intro.html#What_is_mod_perl">What is mod_perl</A>
  -	<LI><A HREF="intro.html#What_is_covered_in_this_document">What is covered in this document</A>
  +	<LI><A HREF="intro.html#What_will_you_learn">What will you learn</A>
   	<LI><A HREF="intro.html#References_and_Acknowledgments">References and Acknowledgments</A>
   </UL>
   <P><LI><A HREF="start.html"><B><FONT SIZE=+1>Guide's Overview</FONT></B></A></LI><P>
  @@ -54,14 +59,14 @@
   
   	<LI><A HREF="strategy.html#Do_it_like_me_">Do it like me?!</A>
   	<LI><A HREF="strategy.html#mod_perl_Deploying_Schemas_Overv">mod_perl Deploying Schemas Overview</A>
  -	<LI><A HREF="strategy.html#Stand_alone_mod_perl_Enabled_Apa">Stand alone mod_perl Enabled Apache Server</A>
  +	<LI><A HREF="strategy.html#Standalone_mod_perl_Enabled_Apac">Standalone mod_perl Enabled Apache Server</A>
   	<LI><A HREF="strategy.html#One_Plain_and_One_mod_perl_enabl">One Plain and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="strategy.html#One_light_non_Apache_and_One_mod">One light non-Apache and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="strategy.html#Adding_a_Proxy_Server_in_http_Ac">Adding a Proxy Server in http Accelerator Mode</A>
   	<LI><A HREF="strategy.html#squid_server">squid server</A>
   	<LI><A HREF="strategy.html#apache_s_mod_proxy">apache's mod_proxy</A>
   </UL>
  -<P><LI><A HREF="scenario.html"><B><FONT SIZE=+1>Real World Scenarios of Implementing Various Strategies</FONT></B></A></LI><P>
  +<P><LI><A HREF="scenario.html"><B><FONT SIZE=+1>Real World Scenarios Implementaion</FONT></B></A></LI><P>
   <UL>
   
   	<LI><A HREF="scenario.html#Before_you_dive_into_the_gory_de">Before you dive into the gory details</A>
  @@ -88,6 +93,7 @@
   	<LI><A HREF="scenario.html#Running_1_webserver_and_squid_in">Running 1 webserver and squid in httpd accelerator mode</A>
   	<LI><A HREF="scenario.html#Using_mod_proxy">Using mod_proxy</A>
   	<LI><A HREF="scenario.html#mod_perl_server_as_DSO">mod_perl server as DSO</A>
  +	<LI><A HREF="scenario.html#HTTP_Authentication_with_2_serve">HTTP Authentication with 2 servers + proxy</A>
   </UL>
   <P><LI><A HREF="install.html"><B><FONT SIZE=+1>Installation Notes</FONT></B></A></LI><P>
   <UL>
  @@ -112,7 +118,7 @@
   
   	<LI><A HREF="install.html#Is_it_possible_to_install_and_us">Is it possible to install and use apache/mod_perl without having a root access?</A>
   	<LI><A HREF="install.html#Is_it_possible_to_determine_whic">Is it possible to determine which options were given to modperl's Makefile.PL</A>
  -	<LI><A HREF="install.html#Server_Installation">Server Installation</A>
  +	<LI><A HREF="install.html#Server_Installation_problems">Server Installation problems</A>
   	<UL>
   
   		<LI><A HREF="install.html#make_test_fails">make test fails</A>
  @@ -129,6 +135,7 @@
   		<LI><A HREF="config.html#Location_Configuration">Location Configuration</A>
   		<LI><A HREF="config.html#PerlFreshRestart">PerlFreshRestart</A>
   		<LI><A HREF="config.html#_perl_status_location">/perl-status location</A>
  +		<LI><A HREF="config.html#PerlSetVar_PerlSetEnv_and_PerlP">PerlSetVar, PerlSetEnv and PerlPassEnv</A>
   		<LI><A HREF="config.html#perl_startup_file">perl-startup file</A>
   		<UL>
   
  @@ -139,6 +146,7 @@
   
   	</UL>
   
  +	<LI><A HREF="config.html#Running_apachectl_configtest_o">Running 'apachectl configtest' or 'httpd -t'</A>
   	<LI><A HREF="config.html#Perl_behavior_controls">Perl behavior controls</A>
   	<LI><A HREF="config.html#Tuning_MinSpareServers_MaxSpareS">Tuning MinSpareServers MaxSpareServers StartServers MaxClients</A>
   	<LI><A HREF="config.html#Publishing_port_numbers_differen">Publishing port numbers different from 80</A>
  @@ -155,6 +163,7 @@
   		<LI><A HREF="config.html#the_server_no_longer_retrieves_t">the server no longer retrieves the DirectoryIndex files for a directory</A>
   	</UL>
   
  +	<LI><A HREF="config.html#Configuration_Security_Concerns">Configuration Security Concerns</A>
   </UL>
   <P><LI><A HREF="frequent.html"><B><FONT SIZE=+1>Frequent mod_perl problems</FONT></B></A></LI><P>
   <UL>
  @@ -197,6 +206,7 @@
   		<LI><A HREF="porting.html#Memory_leakage">Memory leakage</A>
   	</UL>
   
  +	<LI><A HREF="porting.html#Passing_ENV_variables_to_CGI">Passing ENV variables to CGI</A>
   	<LI><A HREF="porting.html#Filehandlers_and_locks_leakages">Filehandlers and locks leakages</A>
   	<UL>
   
  @@ -208,6 +218,7 @@
   	<LI><A HREF="porting.html#Redirecting_Errors_to_Client_ins">Redirecting Errors to Client instead of error_log</A>
   	<LI><A HREF="porting.html#Finding_the_line_number_the_erro">Finding the line number the error/warning has been triggered at</A>
   	<LI><A HREF="porting.html#Forking_subprocesses_from_mod_pe">Forking subprocesses from mod_perl</A>
  +	<LI><A HREF="porting.html#Generating_correct_HTTP_MIME_Hea">Generating correct HTTP MIME Headers</A>
   </UL>
   <P><LI><A HREF="performance.html"><B><FONT SIZE=+1>Performance. Benchmarks.</FONT></B></A></LI><P>
   <UL>
  @@ -252,6 +263,35 @@
   	<LI><A HREF="performance.html#Profiling">Profiling</A>
   	<LI><A HREF="performance.html#CGI_pm_s_object_methods_calls_vs">CGI.pm's object methods calls vs. function calls</A>
   </UL>
  +<P><LI><A HREF="hardware.html"><B><FONT SIZE=+1>Choosing an Operating System and a Hardware</FONT></B></A></LI><P>
  +<UL>
  +
  +	<LI><A HREF="hardware.html#Is_it_important_">Is it important?</A>
  +	<LI><A HREF="hardware.html#Operating_System_Choosing">Operating System Choosing</A>
  +	<UL>
  +
  +		<LI><A HREF="hardware.html#Stability_and_Robustness">Stability and Robustness</A>
  +		<LI><A HREF="hardware.html#Memory_Management">Memory Management</A>
  +		<LI><A HREF="hardware.html#Memory_Leakages">Memory Leakages</A>
  +		<LI><A HREF="hardware.html#Sharing_Memory">Sharing Memory</A>
  +		<LI><A HREF="hardware.html#Cost_and_Support">Cost and Support</A>
  +		<LI><A HREF="hardware.html#Discontinued_products">Discontinued products</A>
  +		<LI><A HREF="hardware.html#OS_Releases">OS Releases</A>
  +	</UL>
  +
  +	<LI><A HREF="hardware.html#Hardware_Choosing">Hardware Choosing</A>
  +	<UL>
  +
  +		<LI><A HREF="hardware.html#Site_s_traffic">Site's traffic</A>
  +		<LI><A HREF="hardware.html#Cash">Cash</A>
  +		<LI><A HREF="hardware.html#IO_performance">IO performance</A>
  +		<LI><A HREF="hardware.html#Memory">Memory</A>
  +		<LI><A HREF="hardware.html#Internet_Connection">Internet Connection</A>
  +		<LI><A HREF="hardware.html#Bottlenecks">Bottlenecks</A>
  +		<LI><A HREF="hardware.html#Conclusion">Conclusion</A>
  +	</UL>
  +
  +</UL>
   <P><LI><A HREF="obvious.html"><B><FONT SIZE=+1>Things obvious to others, but not to you</FONT></B></A></LI><P>
   <UL>
   
  @@ -303,6 +343,17 @@
   	<LI><A HREF="warnings.html#Evil_things_might_happen_when_us">Evil things might happen when using PerlFreshRestart</A>
   	<LI><A HREF="warnings.html#server_reached_MaxClients_settin">server reached MaxClients setting, consider raising the MaxClients setting</A>
   </UL>
  +<P><LI><A HREF="security.html"><B><FONT SIZE=+1>Protecting Your Site</FONT></B></A></LI><P>
  +<UL>
  +
  +	<LI><A HREF="security.html#An_Importance_of_Your_site_s_Sec">An Importance of Your site's Security</A>
  +	<LI><A HREF="security.html#Illustrated_security_scenarios">Illustrated security scenarios</A>
  +	<UL>
  +
  +		<LI><A HREF="security.html#Non_authenticated_access_for_int">Non authenticated access for internal IPs, but authenticated by external IPs</A>
  +	</UL>
  +
  +</UL>
   <P><LI><A HREF="databases.html"><B><FONT SIZE=+1>mod_perl and Relational Databases</FONT></B></A></LI><P>
   <UL>
   
  @@ -386,7 +437,7 @@
   <P><LI><A HREF="browserbugs.html"><B><FONT SIZE=+1>Workarounds for some known bugs in browsers.</FONT></B></A></LI><P>
   <UL>
   
  -	<LI><A HREF="browserbugs.html#Preventing_QUERY_STRING_to_get_c">Preventing QUERY_STRING to get corrupted with &amp;entity key names.</A>
  +	<LI><A HREF="browserbugs.html#Preventing_QUERY_STRING_from_get">Preventing QUERY_STRING from getting corrupted because of &amp;entity key names.</A>
   	<LI><A HREF="browserbugs.html#IE_4_x_does_not_re_post_data_to_">IE 4.x does not re-post data to a non-port-80 URL</A>
   </UL>
   <P><LI><A HREF="modules.html"><B><FONT SIZE=+1>Apache::* modules</FONT></B></A></LI><P>
  @@ -431,6 +482,7 @@
   	<LI><A HREF="help.html#Get_helped_with_Perl_CGI">Get helped with Perl/CGI</A>
   	<LI><A HREF="help.html#Get_helped_with_Apache">Get helped with Apache </A>
   	<LI><A HREF="help.html#Get_helped_with_DBI">Get helped with DBI</A>
  +	<LI><A HREF="help.html#Get_helped_with_Squid_Internet">Get helped with Squid - Internet Object Cache</A>
   </UL>
   <P><LI><A HREF="download.html"><B><FONT SIZE=+1>Appendix A: Downloading software and documentation</FONT></B></A></LI><P>
   <UL>
  @@ -439,8 +491,8 @@
   	<LI><A HREF="download.html#perl">perl</A>
   	<LI><A HREF="download.html#apache">apache</A>
   	<LI><A HREF="download.html#mod_perl">mod_perl</A>
  -	<LI><A HREF="download.html#Squid">Squid</A>
  -	<LI><A HREF="download.html#thttpd">thttpd</A>
  +	<LI><A HREF="download.html#Squid_Internet_Object_Cache">Squid - Internet Object Cache</A>
  +	<LI><A HREF="download.html#thttpd_tiny_turbo_throttling_H">thttpd - tiny/turbo/throttling HTTP server</A>
   	<LI><A HREF="download.html#mod_proxy_add_forward">mod_proxy_add_forward</A>
   </UL>
   <P>
  @@ -500,7 +552,7 @@
   <TR ALIGN=CENTER VALIGN=TOP>
   
   <TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A
  -HREF="help.html#This_document_s_Author">Stas Bekman</A>.<BR> Last Modified at 05/08/1999
  +HREF="help.html#This_document_s_Author">Stas Bekman</A>.<BR> Last Modified at 05/17/1999
   </FONT></B></TD>
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
  
  
  
  1.2       +19 -12    modperl-site/guide/install.html
  
  Index: install.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/install.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- install.html	1999/05/08 18:05:54	1.1
  +++ install.html	1999/05/17 20:47:36	1.2
  @@ -49,7 +49,7 @@
   
   	<LI><A HREF="#Is_it_possible_to_install_and_us">Is it possible to install and use apache/mod_perl without having a root access?</A>
   	<LI><A HREF="#Is_it_possible_to_determine_whic">Is it possible to determine which options were given to modperl's Makefile.PL</A>
  -	<LI><A HREF="#Server_Installation">Server Installation</A>
  +	<LI><A HREF="#Server_Installation_problems">Server Installation problems</A>
   	<UL>
   
   		<LI><A HREF="#make_test_fails">make test fails</A>
  @@ -85,8 +85,7 @@
   <PRE>  Do you wish to use dynamic loading? [y]
   </PRE>
   <P>
  -You will want this feature on to dynamically load the Perl
  -Modules/extensions.
  +Answer <CODE>y</CODE> to be able to load dynamically Perl Modules extensions.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -192,8 +191,8 @@
   <CODE>telnet</CODE> to talk directly to the web server.
   
   <P>
  -Assume that you set <CODE>Port 8080</CODE> in the httpd.conf for your mod_perl enabled server. Telnet to your server
  -at port 8080, and type <CODE>HEAD / HTTP/1.0</CODE> then press the &lt;ENTER&gt; key TWICE!
  +Assuming that your mod_perl enabled server listens to port 8080, telnet to
  +your server at port 8080, and type <CODE>HEAD / HTTP/1.0</CODE> then press the &lt;ENTER&gt; key TWICE!
   
   <P>
   <PRE>  % telnet yourserver.com 8080&lt;ENTER&gt;
  @@ -251,7 +250,8 @@
   <PRE>  % chmod a+x test.pl
   </PRE>
   <P>
  -Now fetch the URL <CODE>http://www.you.com:8080/perl/test.pl</CODE>. You should see something like this (part of the output was snipped).
  +Now fetch the URL <CODE>http://www.you.com:8080/perl/test.pl</CODE> (replace 8080 with the port your mod_perl enabled server is listening to.
  +You should see something like this (part of the output was snipped).
   
   <P>
   <PRE>  SERVER_SOFTWARE    Apache/1.3.6 (Unix) mod_perl/1.19
  @@ -319,6 +319,9 @@
   To see the server's version only.
   
   <P>
  +Again use <CODE>www.site.com:port_number</CODE> if your server is listening to a non-default 80 port.
  +
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Is_it_possible_to_install_and_us">Is it possible to install and use apache/mod_perl without having a root access?</A></H1></CENTER>
   <P>
  @@ -351,19 +354,23 @@
   the host will ask you to shutdown your mod_perl server, or to find another
   home for it. You have a few solutions:
   
  +<UL>
  +<P><LI>
   <P>
  -<STRONG>a</STRONG>. Reduce resource usage - see <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>
  +Reduce resource usage - see <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>
   
   
   
  +<P><LI>
   <P>
  -<STRONG>b</STRONG>. Ask your ISP if you can put a dedicated machine into their computer room
  +Ask your ISP if you can put a dedicated machine into their computer room
   and be root there.
   
  +<P><LI>
   <P>
  -<STRONG>c</STRONG>. Look for another ISP with lots of resources or one that supports mod_perl
  -(not likely)
  +Look for another ISP with lots of resources or one that supports mod_perl.
   
  +</UL>
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Is_it_possible_to_determine_whic">Is it possible to determine which options were given to modperl's Makefile.PL</A></H1></CENTER>
  @@ -397,7 +404,7 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="Server_Installation">Server Installation</A></H1></CENTER>
  +<CENTER><H1><A NAME="Server_Installation_problems">Server Installation problems</A></H1></CENTER>
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="make_test_fails">make test fails</A></H2></CENTER>
  @@ -451,7 +458,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.10      +40 -35    modperl-site/guide/intro.html
  
  Index: intro.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/intro.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- intro.html	1999/05/08 17:46:32	1.9
  +++ intro.html	1999/05/17 20:47:36	1.10
  @@ -30,7 +30,7 @@
   <UL>
   
   	<LI><A HREF="#What_is_mod_perl">What is mod_perl</A>
  -	<LI><A HREF="#What_is_covered_in_this_document">What is covered in this document</A>
  +	<LI><A HREF="#What_will_you_learn">What will you learn</A>
   	<LI><A HREF="#References_and_Acknowledgments">References and Acknowledgments</A>
   </UL>
   <!-- INDEX END -->
  @@ -67,7 +67,7 @@
   The primary advantages of mod_perl are power and speed. You have full
   access to the inner-workings of the web server and can intervene at any
   stage of request-processing. This allows for customized processing of (to
  -name just a few of the phases) URI-&amp;gt;filename translation,
  +name just a few of the phases) URI-&gt;filename translation,
   authentication, response generation and logging. There is very little
   run-time overhead. In particular, it is not necessary to start a separate
   process, as is often done with web-server extensions. The most wide-spread
  @@ -80,7 +80,7 @@
   
   <P>
   You can configure your httpd server and handlers in Perl (using
  -<CODE>PerlSetVar</CODE>, and <CODE>lt</CODE>Perl<CODE>gt</CODE> sections). You can even define your own configuration directives.
  +<CODE>PerlSetVar</CODE>, and &lt;Perl&gt; sections). You can even define your own configuration directives.
   
   <P>
   Many people wonder and ask ``How much of a performance improvement does
  @@ -94,7 +94,7 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="What_is_covered_in_this_document">What is covered in this document</A></H1></CENTER>
  +<CENTER><H1><A NAME="What_will_you_learn">What will you learn</A></H1></CENTER>
   <P>
   This document was written in an effort to help one to start using Apache's
   mod_perl extension as quickly and easily as possible. It includes
  @@ -125,7 +125,7 @@
   the problem and found a solution for it. If you ignore this advice, do not
   be surprised if your question goes unanswered - it bores people to answer
   the same question more than once (twice?). This does not mean that you
  -should avoid asking questions, just do not abuse the available help and <STRONG>RTFM</STRONG>before you call for <STRONG>HELP</STRONG>. (You have certainly heard the infamous fable of the shepherd boy and the
  +should avoid asking questions, just do not abuse the available help and <STRONG>RTFM</STRONG> before you call for <STRONG>HELP</STRONG>. (You have certainly heard the infamous fable of the shepherd boy and the
   wolves...)
   
   <P>
  @@ -140,41 +140,44 @@
   I have used the following references while writing this guide:
   
   <UL>
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl FAQ</A></STRONG>
  +<P><LI>
   <P>
  -by Frank Cringle at <A
  +<STRONG>mod_perl FAQ</STRONG> by Frank Cringle at <A
   HREF="http://perl.apache.org/faq/">http://perl.apache.org/faq/</A> .
   
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl performance tuning guide</A></STRONG>
  +<P><LI>
   <P>
  -by Vivek Khera at <A
  +<STRONG>mod_perl performance tuning guide</STRONG> by Vivek Khera at <A
   HREF="http://perl.apache.org/tuning/">http://perl.apache.org/tuning/</A> .
   
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl plugin reference guide</A></STRONG>
  +<P><LI>
   <P>
  -by Doug MacEachern at <A
  +<STRONG>mod_perl plugin reference guide</STRONG> by Doug MacEachern at <A
   HREF="http://perl.apache.org/src/mod_perl.html">http://perl.apache.org/src/mod_perl.html</A>
   .
   
  -<P><LI><STRONG><A NAME="item_Quick">Quick guide for moving from CGI to mod_perl</A></STRONG>
  +<P><LI>
   <P>
  -at <A
  +<STRONG>Quick guide for moving from CGI to mod_perl</STRONG> at <A
   HREF="http://perl.apache.org/dist/cgi_to_mod_perl.html">http://perl.apache.org/dist/cgi_to_mod_perl.html</A>
   .
   
  -<P><LI><STRONG><A NAME="item_mod_perl_traps">mod_perl_traps, common traps and solutions for mod_perl users</A></STRONG>
  +<P><LI>
   <P>
  -at <A
  +<STRONG>mod_perl_traps, common traps and solutions for mod_perl users</STRONG> at <A
   HREF="http://perl.apache.org/dist/mod_perl_traps.html">http://perl.apache.org/dist/mod_perl_traps.html</A>
   .
   
  -<P><LI><STRONG><A NAME="item_mod_perl">mod_perl mailing list emails</A></STRONG>
  +<P><LI>
   <P>
  -Answers to some of the questions posted to <A
  +<STRONG>mod_perl mailing list emails</STRONG>. Answers to some of the questions posted to <A
   HREF="mailto:modperl@apache.org">modperl@apache.org</A> Apache/Perl mailing
   list.
   
  -<P><LI><STRONG><A NAME="item_My">My personal experience with mod_perl.</A></STRONG>
  +<P><LI>
  +<P>
  +<STRONG>My personal experience with mod_perl</STRONG>.
  +
   </UL>
   <P>
   As I said, I have quoted many information snippets from FAQs and emails,
  @@ -189,33 +192,33 @@
   Major contributors:
   
   <UL>
  -<P><LI><STRONG><A NAME="item_Doug">Doug MacEachern</A></STRONG>
  +<P><LI>
   <P>
  -a big part of this guide is build upon his email replies to the users'
  -questions
  +<STRONG>Doug MacEachern</STRONG>. A big part of this guide is build upon his email replies to users'
  +questions.
   
  -<P><LI><STRONG><A NAME="item_Frank">Frank Cringle</A></STRONG>
  +<P><LI>
   <P>
  -parts of his mod_perl FAQ has been used in the guide.
  +<STRONG>Frank Cringle</STRONG>. Parts of his mod_perl FAQ has been used in the guide.
   
  -<P><LI><STRONG><A NAME="item_Vivek">Vivek Khera</A></STRONG>
  +<P><LI>
   <P>
  -for his mod_perl performance tuning guide.
  +<STRONG>Vivek Khera</STRONG>. For his mod_perl performance tuning guide.
   
  -<P><LI><STRONG><A NAME="item_Steve">Steve Reppucci</A></STRONG>
  +<P><LI>
   <P>
  -who made a thorough review of the stuff I wrote. Fixed lots of spelling and
  -grammar errors, and made the guide readable to English speakers :)
  +<STRONG>Steve Reppucci</STRONG>, who made a thorough review of the stuff I wrote. Fixed lots of spelling
  +and grammar errors, and made the guide readable to English speakers :)
   
  -<P><LI><STRONG><A NAME="item_Eric">Eric Cholet</A></STRONG>
  +<P><LI>
   <P>
  -who wrote complete sections for the guide, and pointed out the errors the
  +<STRONG>Eric Cholet</STRONG>, who wrote complete sections for the guide, and pointed out the errors the
   guide carried away.
   
  -<P><LI><STRONG><A NAME="item_Ken">Ken Williams</A></STRONG>
  +<P><LI>
   <P>
  -who reviewed a lot of stuff in the guide, and many snippets from his emails
  -are included in the guide.
  +<STRONG>Ken Williams</STRONG>, who reviewed a lot of stuff in the guide, and many snippets from his
  +emails are included in the guide.
   
   </UL>
   <P>
  @@ -227,6 +230,7 @@
   <P><LI><STRONG><A NAME="item_Brian">Brian Moseley</A></STRONG>
   <P><LI><STRONG><A NAME="item_Chad">Chad K. Lewis</A></STRONG>
   <P><LI><STRONG><A NAME="item_David">David Landgren</A></STRONG>
  +<P><LI><STRONG><A NAME="item_Dean">Dean Fitz</A></STRONG>
   <P><LI><STRONG><A NAME="item_Doug">Doug Bagley</A></STRONG>
   <P><LI><STRONG><A NAME="item_Ed">Ed Park</A></STRONG>
   <P><LI><STRONG><A NAME="item_Edmund">Edmund Mergl</A></STRONG>
  @@ -253,6 +257,7 @@
   <P><LI><STRONG><A NAME="item_Radu">Radu Greab</A></STRONG>
   <P><LI><STRONG><A NAME="item_Ralf">Ralf Engelschall</A></STRONG>
   <P><LI><STRONG><A NAME="item_Randal">Randal Schwartz</A></STRONG>
  +<P><LI><STRONG><A NAME="item_Rauznitz">Rauznitz Balazs</A></STRONG>
   <P><LI><STRONG><A NAME="item_Richard">Richard Dice</A></STRONG>
   <P><LI><STRONG><A NAME="item_Tzvetan">Tzvetan Stoyanov</A></STRONG>
   <P><LI><STRONG><A NAME="item_Ulrich">Ulrich Pfeifer</A></STRONG>
  @@ -264,7 +269,7 @@
   this amazing idea of mod_perl a reality. This includes Doug MacEachern, the
   author of mod_perl and all the developers who contributed bug patches,
   modules and help. And of course the numerous unseen users who helped to
  -find the bugs and advocate mod_perl around the world.
  +find bugs and advocate the mod_perl around the world.
   
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
  @@ -289,7 +294,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.12      +3 -3      modperl-site/guide/obvious.html
  
  Index: obvious.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/obvious.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- obvious.html	1999/05/08 17:46:32	1.11
  +++ obvious.html	1999/05/17 20:47:37	1.12
  @@ -25,7 +25,7 @@
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
   Things obvious to others, but not to you</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="hardware.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  @@ -779,7 +779,7 @@
   
   <P>
   <PRE>  open(PUBLISH, &quot;GATEWAY_INTERFACE=CGI/1.1 ; script.cgi
  -       \&quot;param1=value1&amp;param2=value2\&quot; |&quot;) or die &quot;...: $!\n&quot;;
  +       &quot;param1=value1&amp;param2=value2&quot; |&quot;) or die &quot;...: $!\n&quot;;
   </PRE>
   <P>
   Make sure, that the parameters you pass are shell safe (All ``unsafe''
  @@ -801,7 +801,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]
  +	     [    <A HREF="hardware.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="warnings.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  
  
  
  1.14      +5 -5      modperl-site/guide/performance.html
  
  Index: performance.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/performance.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- performance.html	1999/05/08 17:46:32	1.13
  +++ performance.html	1999/05/17 20:47:37	1.14
  @@ -25,7 +25,7 @@
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
   Performance. Benchmarks.</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="hardware.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  @@ -1610,11 +1610,11 @@
   Many old CGIs were written in style of:
   
   <P>
  -<PRE>  print &quot;&lt;BODY BGCOLOR=\&quot;black\&quot; TEXT=\&quot;white\&quot;&gt;&quot;;
  +<PRE>  print &quot;&lt;BODY BGCOLOR=&quot;black&quot; TEXT=&quot;white&quot;&gt;&quot;;
     print &quot;&lt;H1&gt;&quot;;
     print &quot;Hello&quot;;
     print &quot;&lt;/H1&gt;&quot;;
  -  print &quot;&lt;A HREF=\&quot;foo.html\&quot;&gt; foo &lt;/A&gt;&quot;;
  +  print &quot;&lt;A HREF=&quot;foo.html&quot;&gt; foo &lt;/A&gt;&quot;;
     print &quot;&lt;/BODY&gt;&quot;;
   </PRE>
   <P>
  @@ -1738,7 +1738,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]
  +	     [    <A HREF="porting.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="hardware.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  @@ -1751,7 +1751,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/14/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.15      +55 -6     modperl-site/guide/porting.html
  
  Index: porting.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/porting.html,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- porting.html	1999/05/08 17:46:33	1.14
  +++ porting.html	1999/05/17 20:47:37	1.15
  @@ -60,6 +60,7 @@
   		<LI><A HREF="#Memory_leakage">Memory leakage</A>
   	</UL>
   
  +	<LI><A HREF="#Passing_ENV_variables_to_CGI">Passing ENV variables to CGI</A>
   	<LI><A HREF="#Filehandlers_and_locks_leakages">Filehandlers and locks leakages</A>
   	<UL>
   
  @@ -71,6 +72,7 @@
   	<LI><A HREF="#Redirecting_Errors_to_Client_ins">Redirecting Errors to Client instead of error_log</A>
   	<LI><A HREF="#Finding_the_line_number_the_erro">Finding the line number the error/warning has been triggered at</A>
   	<LI><A HREF="#Forking_subprocesses_from_mod_pe">Forking subprocesses from mod_perl</A>
  +	<LI><A HREF="#Generating_correct_HTTP_MIME_Hea">Generating correct HTTP MIME Headers</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -1007,6 +1009,16 @@
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Passing_ENV_variables_to_CGI">Passing ENV variables to CGI</A></H1></CENTER>
  +<P>
  +To pass an environment variable from a configuration file, add to it:
  +
  +<P>
  +<PRE>  PerlSetEnv key val
  +  PerlPassEnv key
  +</PRE>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Filehandlers_and_locks_leakages">Filehandlers and locks leakages</A></H1></CENTER>
   <P>
   At the beginning there was:
  @@ -1380,13 +1392,17 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Finding_the_line_number_the_erro">Finding the line number the error/warning has been triggered at</A></H1></CENTER>
   <P>
  -If you compile with the experimental <STRONG>PERL_MARK_WHERE=1</STRONG>, it shows you ``exactly'' where this is happening. many times compiler
  -makes a shift for ``unknown'' reasons in its line counter. You can always
  -stuff your code with special compiler directives, to reset its counter to
  -the value you will tell. At the beginning of the line you should write (the
  -'#' in column 1):
  +<CODE>Apache::Registry</CODE>, <CODE>Apache::PerlRun</CODE> and modules that compile-via-eval confuse the line numbering. Other files
  +that are read normally by Perl from disk have no problem with file
  +name/line number.
   
   <P>
  +If you compile with the experimental <STRONG>PERL_MARK_WHERE=1</STRONG>, it shows you ``exactly'' where this is happening. Generally compiler
  +makes a shift in its line counter. You can always stuff your code with
  +special compiler directives, to reset its counter to the value you will
  +tell. At the beginning of the line you should write (the '#' in column 1):
  +
  +<P>
   <PRE>  #line 298 myscript.pl
     or 
     #line 890 some_label_to_be_used_in_the_error_message
  @@ -1488,6 +1504,39 @@
   want is to send information to the browser and then do some
   post-processing, look into <CODE>PerlCleanupHandler</CODE>.
   
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="Generating_correct_HTTP_MIME_Hea">Generating correct HTTP MIME Headers</A></H1></CENTER>
  +<P>
  +The <CODE>Apache::print()</CODE> routine has to gather up the headers that your script outputs, in order to
  +pass them to <CODE>$r-&amp;gt;send_http_header</CODE>. This happens in <CODE>src/modules/perl/Apache.xs</CODE> (<CODE>print</CODE>) and
  +<CODE>Apache/Apache.pm</CODE> (<CODE>send_cgi_header</CODE>). There is a shortcut in there, namely the assumption that each print
  +statement contains one or more complete headers. If for example you used to
  +generate a
  +<CODE>Set-Cookie</CODE> header by multiply <CODE>print()</CODE> statements, like:
  +
  +<P>
  +<PRE>   print &quot;Content-type: text/html\n&quot;;
  +   print &quot;Set-Cookie: iscookietext\; &quot;;
  +   print &quot;expires=Wednesday, 09-Nov-1999 00:00:00 GMT\; &quot;;
  +   print &quot;path=\/\; &quot;;
  +   print &quot;domain=\.mmyserver.com\; &quot;;
  +   print &quot;\n\n&quot;;
  +   print &quot;hello&quot;;
  +</PRE>
  +<P>
  +your generated <CODE>Set-Cookie</CODE> header is split over a number of print statements and gets lost. Try this:
  +
  +<P>
  +<PRE>   print &quot;Content-type: text/html\n&quot;;
  +   my $cookie = &quot;Set-Cookie: iscookietext\; &quot;;
  +   $cookie .= &quot;expires=Wednesday, 09-Nov-1999 00:00:00 GMT\; &quot;;
  +   $cookie .= &quot;path=\/\; &quot;;
  +   $cookie .= &quot;domain=\.mmyserver.com\; &quot;;
  +   print $cookie;
  +   print &quot;\n\n&quot;;
  +   print &quot;hello&quot;;
  +</PRE>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
  @@ -1511,7 +1560,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.13      +52 -7     modperl-site/guide/scenario.html
  
  Index: scenario.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/scenario.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- scenario.html	1999/05/08 17:46:33	1.12
  +++ scenario.html	1999/05/17 20:47:38	1.13
  @@ -1,7 +1,7 @@
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
   <HTML>
   <HEAD>
  -   <TITLE>mod_perl guide: Real World Scenarios of Implementing Various Strategies</TITLE>
  +   <TITLE>mod_perl guide: Real World Scenarios Implementaion</TITLE>
      <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
      <META NAME="Author" CONTENT="Bekman Stas">
      <META NAME="Description" CONTENT="All Apache/Perl related information: Hints, 
  @@ -23,7 +23,7 @@
   <H1 ALIGN=CENTER>
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A>
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  -Real World Scenarios of Implementing Various Strategies</H1>
  +Real World Scenarios Implementaion</H1>
   <HR WIDTH="100%">
   	    [    <A HREF="strategy.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="install.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
  @@ -53,6 +53,7 @@
   	<LI><A HREF="#Running_1_webserver_and_squid_in">Running 1 webserver and squid in httpd accelerator mode</A>
   	<LI><A HREF="#Using_mod_proxy">Using mod_proxy</A>
   	<LI><A HREF="#mod_perl_server_as_DSO">mod_perl server as DSO</A>
  +	<LI><A HREF="#HTTP_Authentication_with_2_serve">HTTP Authentication with 2 servers + proxy</A>
   </UL>
   <!-- INDEX END -->
   
  @@ -945,11 +946,26 @@
     ProxyPassReverse /modperl/ <A HREF="http://localhost:81/modperl/">http://localhost:81/modperl/</A>
   </PRE>
   <P>
  -<CODE>PPR</CODE> is the saving grace here, that makes Apache a win for me over Squid. That
  -cleans up redirects and stuff to remove the :81 from the URIs. Very nice.
  +<CODE>PPR</CODE> is the saving grace here, that makes Apache a win over Squid. That cleans
  +up redirects and stuff to remove the :81 from the URIs. Very nice.
   
   <P>
  -Ask Bjoern Hansen has written a <CODE>mod_proxy_add_forward.c</CODE> module for Apache, that sets the <CODE>X-Forwarded-For</CODE> field when doing a <CODE>ProxyPass</CODE>, similar to what Squid can do. His patch is at: <A
  +You can control the buffering feature with <CODE>ProxyReceiveBufferSize</CODE>
  +directive:
  +
  +<P>
  +<PRE>  ProxyReceiveBufferSize 1048576
  +</PRE>
  +<P>
  +will set a buffer size to be of 1Mb. If it is not set explicitly, then the
  +default buffer size is used, which depends on OS, for Linux I suspect it is
  +somewhere below 32k. So basicaly to get an immediate release of the
  +mod_perl server, <CODE>ProxyReceiveBufferSize</CODE> should be set to a value greater than the biggest generated respond
  +produced by any mod_perl script.
  +
  +<P>
  +Ask Bjoern Hansen has written a <CODE>mod_proxy_add_forward.c</CODE> module for Apache, that sets the <CODE>X-Forwarded-For</CODE> field when doing a
  +<CODE>ProxyPass</CODE>, similar to what Squid can do. His patch is at: <A
   HREF="http://modules.apache.org/search?id=124">http://modules.apache.org/search?id=124</A>
   or at <A
   HREF="ftp://ftp.netcetera.dk/pub/apache/">ftp://ftp.netcetera.dk/pub/apache/</A>
  @@ -1005,20 +1021,49 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="mod_perl_server_as_DSO">mod_perl server as DSO</A></H1></CENTER>
   <P>
  -To build the mod_perl as DSO add <CODE>USE_DSO=1</CODE> to the rest of configuration parameters, like:
  +To build the mod_perl as DSO add <CODE>USE_DSO=1</CODE> to the rest of configuration parameters (so it will build libperl.so and
  +not libperl.a), like:
   
   <P>
   <PRE>  perl Makefile.PL USE_DSO=1 ...
   </PRE>
   <P>
  +If you run <CODE>./configure</CODE> from apache source do not forget to add:
  +<CODE>--enable-shared=perl</CODE>
  +
  +
  +
  +<P>
   Then just add the <CODE>LoadModule</CODE> into your <CODE>httpd.conf</CODE>.
   
   <P>
   You will find a complete explanation in the <CODE>INSTALL.apaci</CODE> pod which can be found in the mod_perl distribution.
   
   <P>
  +Some people reported that DSO compiled mod_perl would not run on specific
  +OS/perl version. Also threads enabled perl reported sometimes to break the
  +mod_perl/DSO. But it still can work correctly for you.
  +
  +<P>
   &lt;META&gt; Incomplete &lt;/META&gt;
   
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H1><A NAME="HTTP_Authentication_with_2_serve">HTTP Authentication with 2 servers + proxy</A></H1></CENTER>
  +<P>
  +Assuming that you have a setup of one ``front-end'' server, which provides
  +proxies the ``back-end'' (mod_perl) server, if you need to perform the
  +athentication in the ``back-end'' server, it should handle all
  +authentication. If Apache proxies correctly, it seems like it would pass
  +through all authentication information, making the ``front-end'' Apache
  +somewhat ``dumb,'' as it does nothing but pass through information.
  +
  +<P>
  +The only possible caveat in config file is that your Auth stuff needs to be
  +in &lt;Directory ...&gt; ... &lt;/Directory&gt; tags because if you use a
  +&lt;Location /&gt; ... &lt;/Location&gt; the proxypass server takes the
  +auth info for its authentication and would not pass it on.
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   	     The <a href="http://www.modperl.com/">
   	     <B>Writing Apache Modules with Perl and C</B></a>
  @@ -1042,7 +1087,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/15/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.12      +1 -1      modperl-site/guide/snippets.html
  
  Index: snippets.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/snippets.html,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- snippets.html	1999/05/08 17:46:33	1.11
  +++ snippets.html	1999/05/17 20:47:38	1.12
  @@ -272,7 +272,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 04/19/1999
  +	     <BR>Last Modified at 05/17/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.13      +60 -51    modperl-site/guide/start.html
  
  Index: start.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/start.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- start.html	1999/05/08 17:46:33	1.12
  +++ start.html	1999/05/17 20:47:38	1.13
  @@ -49,21 +49,24 @@
   <P>
   <CENTER><H1><A NAME="What_s_inside_">What's inside?</A></H1></CENTER>
   <P>
  -Before you begin to install the mod_perl, you should have an overall
  -picture. There are more then one way you set your mod_perl enabled
  -webserver. You have to decide what mod_perl schema you want to use. <A HREF="././strategy.html#">Picking the Right Strategy</A> chapter presents various approaches, discusses the pros and cons of each
  -one.
  +Before you start with mod_perl installation, you should see an overall
  +picture of this wonderful technology. There is more then one way to use
  +mod_perl enabled webserver. You have to decide what mod_perl schema you
  +want to use. <A HREF="././strategy.html#">Picking the Right Strategy</A>
  +chapter presents various approaches and discusses the pros and cons of
  +them.
   
   <P>
  -Once you know what fits your requirements the best, you should proceed to <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A>. This chapter provides a very detailed scenarios of the schemas discussed
  -in the <A HREF="././strategy.html#">Picking the Right Strategy</A> chapter.
  +Once you know what fits your requirements the best, you should proceed to <A HREF="././scenario.html#">Real World Scenarios Implementaion</A>. This chapter provides a very detailed scenarios of the schemas discussed
  +in the
  +<A HREF="././strategy.html#">Picking the Right Strategy</A> chapter.
   
   <P>
  -<A HREF="././install.html#">Server Installation</A> chapter completes the <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A> by providing more installation details.
  +<A HREF="././install.html#">Server Installation</A> chapter completes the <A HREF="././scenario.html#">Real World Scenarios Implementaion</A> by providing more indepth installation details.
   
   <P>
  -<A HREF="././config.html#">Server Configuration</A> extends the basic configurations presented in the <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A> with extended configurations and solutions to various configuration
  -pitfalls.
  +<A HREF="././config.html#">Server Configuration</A> adds to the basic configurations presented in the <A HREF="././scenario.html#">Real World Scenarios Implementaion</A>
  +extended configurations and various configuration examples.
   
   <P>
   <A HREF="././frequent.html#">Frequent mod_perl problems</A> chapter just collects links to other chapters. It is an attempt to stress
  @@ -72,88 +75,94 @@
   
   <P>
   Probably the most important chapter is <A HREF="././porting.html#">CGI to mod_perl Porting. mod_perl Coding guidelines</A>. It explains what are the differences between scripts running under
  -mod_cgi and mod_perl. What should be done in order to make the existent
  -scripts work under mod_perl. The proper mod_perl coding guidelines.
  +mod_cgi and mod_perl, what should be done in order to make the existent
  +scripts run under mod_perl. Along with the porting notes it provides
  +guidelines for a proper mod_perl programming.
   
   <P>
  -<A HREF="././performance.html#">Performance. Benchmarks</A> is the biggest and very important chapter. It explains the details of
  -tuning the mod_perl and the scripts running under mod_perl, so you can
  -squeeze every ounce of the power from your server. A big part of it are the
  -benchmarks. The numbers that IT managers love to see. But those are
  -different - these benchmarks are comparing mod_perl with other technologies
  -but compare different configurations of mod_perl servers, to guide you in
  -the tuning process. I have to admit - performance tuning is a very hard
  -task, and demands a lot of understanding and experience, but once you get
  -this knowledge - you can make magic with your server.
  +<A HREF="././performance.html#">Performance. Benchmarks</A> is the biggest and a very important chapter. It explains the details of
  +tuning the mod_perl and the scripts running under it, so you can squeeze
  +every ounce of the power from your server. A big part of the chapter are
  +benchmarks, the numbers that IT managers love to read. But these are
  +different benchmarks - they are not comparing mod_perl with other alike
  +technologies but different configurations of mod_perl servers, to guide you
  +through the tuning process. I have to admit - performance tuning is a very
  +hard task, and demands a lot of understanding and experience, but once you
  +acquire this knowledge - you can make a magic with your server.
   
   <P>
   <A HREF="././obvious.html#">Things obvious to others, but not to you</A> is exactly what it claims to be. Some people are too long into this
  -business, and many things have become obvious to them. This is not true for
  -a newbie, this chapter tries to talk about such things.
  +business, and many things have become too obvious to them. This is not true
  +for a newbie, this chapter tries to talk about such things.
   
   <P>
   While developing your mod_perl applications, you are beginning to
   understand that an <CODE>error_log</CODE> file is your best friend. It tells you all the intimate details of what is
  -happening to your scripts, but the problem that it talks in a secret
  +happening to your scripts, but the problem that it speaks a secret
   language. To learn the alphabet and the grammar of this language, refer to
   a <A HREF="././warnings.html#">Warnings and Errors: Where and Why</A>.
   
   <P>
  -If you are into driving relational databases with your cgi scripts, the <A HREF="././databases.html#">mod_perl and Relational Databases</A> chapter will tell you all about what database related goodies mod_perl
  +If you are into a driving of relational databases with your cgi scripts, <A HREF="././databases.html#">mod_perl and Relational Databases</A> chapter will tell you all about database related goodies mod_perl has
   prepared for you.
   
   <P>
   If you are using the good old dbm files for your databases, <A HREF="././dbm.html#">mod_perl and dbm files</A> explains how to utilize them better under mod_perl.
   
   <P>
  -More and more ISPs are evaluating a possibility to give the mod_perl
  -services to their users. Is it possible? Is it secure? Will it work? How
  -much resources? <A HREF="././multiuser.html#">mod_perl for ISPs. mod_perl and Virtual Hosts</A> chapter answers all these questions. If you want to run a mod_perl enabled
  +More and more Internet Service Providers (ISPs) are evaluating a
  +possibility to provide the mod_perl services to their users. Is it
  +possible? Is it secure? Will it work? How much resources does it takes?  <A HREF="././multiuser.html#">mod_perl for ISPs. mod_perl and Virtual Hosts</A>
  +chapter answers all these questions. If you want to run a mod_perl enabled
   server, but do not have a root access read it as well, either to learn how
   do it by yourself, or maybe to persuade your ISP to provide you this
   service.
   
   <P>
  -If you have to administrate your apache mod_perl server - the
  -<A HREF="././control.html#">Controlling and Monitoring the Server</A> chapter is for you. It includes the restarting and monitoring techniques.
  -And very important - how to prevent from server to finish up your disk
  -space in a matter of minutes.
  +If you have to administrate your apache mod_perl server -
  +<A HREF="././control.html#">Controlling and Monitoring the Server</A> chapter is for you. Among the topics there are server restarting and
  +monitoring techniques, preventing from server to eat up all your disk space
  +in a matter of minutes and more.
   
   <P>
   <A HREF="././status.html#">mod_perl Status. Peeking into the Server's Perl Innards</A>
  -chapter shows you the ways you can peek into what is going on in the server
  -while it is running. Like looking what are the value of some global
  -variable. What database connections are open, and much more.
  +chapter shows you the ways you can peek at what is going on in the mod_perl
  +enabled server while it is running. Like looking what is the value of some
  +global variable, what database connections are open, looking up what
  +modules were loaded and their pathes, what is the value of
  +<CODE>@INC</CODE> and much more.
   
   <P>
  -Every programmer need to know how to debug the program. It is _easy_ with
  -perl, you invoke the script with <CODE>-d</CODE> flag and you start debugging it. Is it possible to do under mod_perl, after
  -all you cannot debug every script by running it from the command line?
  -<A HREF="././debug.html#">Debugging mod_perl</A> chapter tells exactly how to do it.
  +Every programmer needs to know how to debug the program she writes. It is
  +an _easy_ task with plain perl. Just invoke the program with <CODE>-d</CODE>
  +flag and debug it. Is it possible to do the same under mod_perl? After all
  +you cannot debug every CGI script by executing it from the command line,
  +some scripts will not run from the command line. <A HREF="././debug.html#">Debugging mod_perl</A> chapter proves it possible and real.
   
   <P>
  -Sometimes browsers that interact with our servers have bugs, creating real
  -problems to the CGI developers. How to prevent this bugs from happening
  -discussed in <A HREF="././browserbugs.html#">Workarounds for some known bugs in browsers</A> chapter.
  +Sometimes browsers that interact with our servers have bugs, which cause a
  +strong headache to CGI developers. Preventing these bugs from happening is
  +being discussed in <A HREF="././browserbugs.html#">Workarounds for some known bugs in browsers</A> chapter.
   
   <P>
  -There many modules were written to extend the mod_perl's core
  -functionality. Some of the important modules are being covered in <A HREF="././modules.html#">Apache::* modules</A>.
  +Many modules were written to extend the mod_perl's core functionality. Some
  +of important modules are being covered in
  +<A HREF="././modules.html#">Apache::* modules</A> chapter.
   
   <P>
  -Some folks decides to go mod_perl, but they miss the basic understanding of
  -the perl, which is not tolerant by mod_perl. if you are such a person,
  -there is nothing to be ashamed of, we all went thru this. Get a good perl
  -book and start reading. <A HREF="././perl.html#">Perl Reference</A> - gives some basic perl lessons, providing the information you cannot start
  -to program mod_perl scripts without.
  +Some folks decide to go mod_perl, but they miss the basic understanding of
  +the perl, which is absolutely not tolerant by mod_perl. If you are such a
  +person, there is nothing to be ashamed of, we all went through this. Get a
  +good perl book and start reading. <A HREF="././perl.html#">Perl Reference</A> gives some basic perl lessons, delivering the knowledge you cannot start to
  +program mod_perl scripts without.
   
   <P>
   <A HREF="././snippets.html#">Code Snippets</A> chapter is just a collection of code snippets I have found useful while
   writing the scripts.
   
   <P>
  -<A HREF="././help.html#">Getting Helped and Further Learning</A> points you to other information sources, like perl programming, security,
  -databases and more.
  +<A HREF="././help.html#">Getting Helped and Further Learning</A> refers you to other related information resources, like learning perl
  +programming and SQL, understanding security, building databases and more.
   
   <P>
   <A HREF="././download.html#">Appendix A: Downloading software and documentation</A>
  @@ -183,7 +192,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/14/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.2       +64 -42    modperl-site/guide/strategy.html
  
  Index: strategy.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/strategy.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- strategy.html	1999/05/08 18:04:24	1.1
  +++ strategy.html	1999/05/17 20:47:38	1.2
  @@ -31,7 +31,7 @@
   
   	<LI><A HREF="#Do_it_like_me_">Do it like me?!</A>
   	<LI><A HREF="#mod_perl_Deploying_Schemas_Overv">mod_perl Deploying Schemas Overview</A>
  -	<LI><A HREF="#Stand_alone_mod_perl_Enabled_Apa">Stand alone mod_perl Enabled Apache Server</A>
  +	<LI><A HREF="#Standalone_mod_perl_Enabled_Apac">Standalone mod_perl Enabled Apache Server</A>
   	<LI><A HREF="#One_Plain_and_One_mod_perl_enabl">One Plain and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="#One_light_non_Apache_and_One_mod">One light non-Apache and One mod_perl enabled Apache Servers</A>
   	<LI><A HREF="#Adding_a_Proxy_Server_in_http_Ac">Adding a Proxy Server in http Accelerator Mode</A>
  @@ -60,87 +60,88 @@
   believe a person, saying: <EM>"Do it this way, this is the best!"</EM>. As the old saying says: <EM>"Trust but verify"</EM>. There are too many technologies out there to pick from, and it might take
   an enormous investment of time and money to try to validate each one,
   before deciding what is your favorite one. Keeping this idea in mind, I
  -will try to present different combinations of other technologies and
  -mod_perl or just stand alone mod_perl. How these things work together, what
  -are the good and what are the bad properties of each one, how hard to
  -install and maintain them, when a specific approach should be picked and
  -when it should be avoided.
  +will try to present different combinations of mod_perl and other
  +technologies or just standalone mod_perl. How these things work together,
  +what are the good and what are the bad properties of each one, how hard to
  +install and maintain them, what approaches should be used and what to be
  +avoided.
   
   <P>
  -To make myself clear, I would not talk about any technologies but the ones
  -useful in tandem with mod_perl.
  +To make myself clear, I would not talk about any technologies and tools,
  +but the ones complementing mod_perl.
   
   <P>
   Please let me stress it again: <STRONG>DO NOT</STRONG> blindly copy someone's setup and hope for a good. Choose what is best for
  -your situation.
  +your situation. it might take _some_ effort to find it out.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="mod_perl_Deploying_Schemas_Overv">mod_perl Deploying Schemas Overview</A></H1></CENTER>
   <P>
   There are several different ways to build, configure and deploy your
  -mod_perl enabled site. Some of the ways are:
  +mod_perl enabled server. Some of them are:
   
   <OL>
   <P><LI>
   <P>
  -1 binary and 1 config file (one big binary for mod_perl)
  +Having 1 binary and 1 config file (one big binary for mod_perl)
   
   <P><LI>
   <P>
  -2 binaries and 2 config files (one big binary for mod_perl and one small
  -for static object like images)
  +Having 2 binaries and 2 config files (one big binary for mod_perl and one
  +small for static object like images)
   
   <P><LI>
   <P>
  -1 DSO style compile and 2 config files (Dynamic linking lets you compile
  -once and have a big and a small binary in memory BUT you have to deal with
  -a freshly made solution that has week documentation and is still subject to
  -change and is rather more complex)
  +Having 1 DSO style binary, mod_perl loadable object and 2 config files
  +(Dynamic linking lets you compile once and have a big and a small binary in
  +memory BUT you have to deal with a freshly made solution that has week
  +documentation and is still subject to change and is rather more complex)
   
   <P><LI>
   <P>
  -Any of the 3 approaches above plus proxy server in the http accelerator
  -mode.
  +Any of the above plus proxy server in the http accelerator mode.
   
   </OL>
   <P>
   If you are a newbie, I would recommend you to start with the first option
   and work on getting your feet wet with apache and mod_perl, then decide
  -whether to move to a second one for production work or move up to the more
  -state-of-the-art-yet-suspiciously-new DSO system (third) or/and proven to
  -be good forth option from above.
  +whether to move to the second one which allows a better tuning for the
  +price of more complicated administration or to the more
  +state-of-the-art-yet-suspiciously-new DSO system (third one) or/and to the
  +forth option which brings you even more power.
   
   <P>
  -Option 1 will kill you in production if you load out a lot of static data
  -with a 2-12 MB webserver process. On the other hand while testing you will
  +First option will kill your production site if you serve a lot of static
  +data with a 2-12 MB webservers. On the other hand while testing you will
   have no other server interaction to mask or add to your errors.
   
   <P>
  -Option 2 means keeping two compiles but lets you seriously tune the two
  -binaries to their exact purpose. On the other hand you have to deal with
  -proxying or fancy site design to keep the two servers in step. Choose
  -serving on multiple ports, multiple IPs, etc...
  -
  -<P>
  -Option 3 (DSO) -- as mentioned above -- means playing with the bleeding
  -edge. Also the <CODE>mod_so</CODE> adds size and complexity to your binaries. The benefit being that modules
  -can be added and removed with out recompiling and even shared amongst
  -multiple servers. Again, it is bleeding edge and still sort of platform
  -wonky so YMMV. See
  -<A HREF="././scenario.html#mod_perl_server_as_DSO">mod_perl server as DSO</A>.
  +Second option allows you to seriously tune the two servers and get the
  +maximum performance. On the other hand you have to deal with proxying or
  +fancy site design to keep the two servers in step. Choose serving on
  +multiple ports, multiple IPs, etc... You also have to admimistrate one more
  +server.
  +
  +<P>
  +Third option (DSO) -- as mentioned above -- means playing with the bleeding
  +edge. In addition <CODE>mod_so</CODE> (the DSO module) adds size and complexity to your binaries. With DSO
  +modules can be added and removed without recompiling the server and even
  +shared amongst multiple servers. Again, it is bleeding edge and still sort
  +of platform wonky, but your milegue may vary. See <A HREF="././scenario.html#mod_perl_server_as_DSO">mod_perl server as DSO</A>.
   
   <P>
  -Option 4 (proxy in http accelerator mode) - should make you lots of good
  -things, once correctly configured and tuned.
  +Forth option (proxy in http accelerator mode) - improves the performance by
  +caching and buffering, once correctly configured and tuned.
   
   <P>
   The rest of this chapter discuss the pros and the cons of each of the
  -presented schemas. <A HREF="././scenario.html#">Real World Scenarios of Implementing Various Strategies</A> describes the implementation techniques of described schemas.
  +presented schemas. <A HREF="././scenario.html#">Real World Scenarios Implementaion</A>
  +describes the implementation techniques of described schemas.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  -<CENTER><H1><A NAME="Stand_alone_mod_perl_Enabled_Apa">Stand alone mod_perl Enabled Apache Server</A></H1></CENTER>
  +<CENTER><H1><A NAME="Standalone_mod_perl_Enabled_Apac">Standalone mod_perl Enabled Apache Server</A></H1></CENTER>
   <P>
   The first approach is to implement a straightforward mod_perl server. Just
   take your plain apache server and add to it the mod_perl, like you add any
  @@ -328,6 +329,10 @@
   does not spawn child processes.
   
   <P>
  +Meta: Hey No personal experience. Please let me know if I have missed some
  +pros/cons here. Thanks!
  +
  +<P>
   The Advantages:
   
   <UL>
  @@ -353,7 +358,8 @@
   <UL>
   <P><LI>
   <P>
  -Not that I know of :)
  +Lucks some apache's features, like access control, error redirection,
  +logfile format and so on. 
   
   </UL>
   <P>
  @@ -592,6 +598,22 @@
     ProxyPassReverse /modperl/ <A HREF="http://localhost:81/modperl/">http://localhost:81/modperl/</A>
   </PRE>
   <P><LI>
  +<P>
  +It does mod_perl output buffering as squid. See the implementation notes
  +for more details
  +
  +<P><LI>
  +<P>
  +It even does caching. You have to produce correct <CODE>Content-Length</CODE>,
  +<CODE>Last-Modified</CODE> and <CODE>Expires</CODE> http headres for it to work. If some dynamic content is not to change
  +constantly, you can dramatically increase performance with caching it by
  +ProxyPass.
  +
  +<P><LI>
  +<P>
  +<CODE>ProxyPass</CODE> happens before the authentication phase, so you do not have to worry about
  +authenticating twice.
  +
   </UL>
   <P>
   The Disadvantages:
  @@ -625,7 +647,7 @@
       <B>
         <FONT SIZE=-1>
   	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  -	     <BR>Last Modified at 05/08/1999
  +	     <BR>Last Modified at 05/17/1999
         </FONT>
       </B>
     </TD>
  
  
  
  1.13      +2 -2      modperl-site/guide/warnings.html
  
  Index: warnings.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/warnings.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- warnings.html	1999/05/08 17:46:34	1.12
  +++ warnings.html	1999/05/17 20:47:39	1.13
  @@ -25,7 +25,7 @@
   <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
   Warnings and Errors: Where and Why.</H1>
   <HR WIDTH="100%">
  -	    [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  +	    [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="security.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
   <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
   <UL>
   
  @@ -417,7 +417,7 @@
   	     Amazon.com</a>.
   
   	     <HR>
  -	     [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]
  +	     [    <A HREF="obvious.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="security.html">Next</A>      ]
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
   <TR ALIGN=CENTER VALIGN=TOP>
  
  
  
  1.1                  modperl-site/guide/hardware.html
  
  Index: hardware.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  <HTML>
  <HEAD>
     <TITLE>mod_perl guide: Choosing an Operating System and a Hardware</TITLE>
     <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
     <META NAME="Author" CONTENT="Bekman Stas">
     <META NAME="Description" CONTENT="All Apache/Perl related information: Hints, 
  Guidelines, Scenarios and Troubleshottings">
     <META NAME="keywords" CONTENT="mod_perl modperl perl apache cgi webserver speed 
  fast guide mod_perl apache guide help info faq mod_perl installation cgi
  troubleshooting help no sex speedup free open source OSS mod_perl apache guide">
  </HEAD>
       <LINK REL=STYLESHEET TYPE="text/css"
          HREF="style.css" TITLE="refstyle">
       <style type="text/css">
       <!-- 
          @import url(style.css);
       -->
       
       </style>
  <BODY TEXT="#000000" BGCOLOR="#E0FFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
  <A NAME="toc"></A>
  <H1 ALIGN=CENTER>
  <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A>
  <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  Choosing an Operating System and a Hardware</H1>
  <HR WIDTH="100%">
  	    [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
  <UL>
  
  	<LI><A HREF="#Is_it_important_">Is it important?</A>
  	<LI><A HREF="#Operating_System_Choosing">Operating System Choosing</A>
  	<UL>
  
  		<LI><A HREF="#Stability_and_Robustness">Stability and Robustness</A>
  		<LI><A HREF="#Memory_Management">Memory Management</A>
  		<LI><A HREF="#Memory_Leakages">Memory Leakages</A>
  		<LI><A HREF="#Sharing_Memory">Sharing Memory</A>
  		<LI><A HREF="#Cost_and_Support">Cost and Support</A>
  		<LI><A HREF="#Discontinued_products">Discontinued products</A>
  		<LI><A HREF="#OS_Releases">OS Releases</A>
  	</UL>
  
  	<LI><A HREF="#Hardware_Choosing">Hardware Choosing</A>
  	<UL>
  
  		<LI><A HREF="#Site_s_traffic">Site's traffic</A>
  		<LI><A HREF="#Cash">Cash</A>
  		<LI><A HREF="#IO_performance">IO performance</A>
  		<LI><A HREF="#Memory">Memory</A>
  		<LI><A HREF="#Internet_Connection">Internet Connection</A>
  		<LI><A HREF="#Bottlenecks">Bottlenecks</A>
  		<LI><A HREF="#Conclusion">Conclusion</A>
  	</UL>
  
  </UL>
  <!-- INDEX END -->
  
  <HR>
  
  	     The <a href="http://www.modperl.com/">
  	     <B>Writing Apache Modules with Perl and C</B></a>
  	     book can be purchased online from <a
  	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  	     and <a
  	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  	     Amazon.com</a>.
  
  	     <HR>
  
  	      <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <P>
  <CENTER><H1><A NAME="Is_it_important_">Is it important?</A></H1></CENTER>
  <P>
  You can invest a lot of time and money into a server tuning and code
  rewriting according the guidelines you have just learned, but your
  performance will be really bad if you did not took into account the
  hardware demands, and did not wisely chosen the operational system suited
  for your needs. While tips below apply to any webserver, they are written
  for a mod_perl enabled webservers' administrators.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H1><A NAME="Operating_System_Choosing">Operating System Choosing</A></H1></CENTER>
  <P>
  First lets talk about Operating Systems (OS). While personally I am a Linux
  devotee, I do not want to start yet another OS war. Assuming this, I will
  try to define what you should be looking for, then when you know what do
  you want from your to be chosen OS, go find it. Enter the newsgroup of an
  OS you think is a good candidate, and tell: ``I need an OS with good X,
  fast Y and stable Z, do you think Foo OS answers all of my demands?'' I
  will leave this fan research up to you. But I would use linux :) Just
  kidding...
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Stability_and_Robustness">Stability and Robustness</A></H2></CENTER>
  <P>
  Probably the most important feature we want from OS is its stability and
  robustness. We are into an Internet business, which does not have working
  hours, like many conventional businesses we know about (9pm to 5pm). We are
  open 24 hours a day. We can not afford off line periods, for our customers
  will go shop for another service like ours, unless you have a monopoly :) .
  If the OS of your choice crashes every day or so, I would throw it away,
  after doing a little investigation, for there are might be a reason for a
  system crash. Like a runaway server that eats up all the memory and disk,
  so we cannot blame the OS for that. Generally people who use the OS for
  some time can tell you a lot about its stability.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Memory_Management">Memory Management</A></H2></CENTER>
  <P>
  You want an OS with good memory management, for some OSes are well known as
  memory hogs. The same code can use as twice as much memory on one OS
  compared to the other. If the size of the mod_perl process is 10Mb and you
  have tens of these running, it definitely adds up!
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Memory_Leakages">Memory Leakages</A></H2></CENTER>
  <P>
  Some OSes and/or the libraries (like c libs) suffer from bad memory
  leakages. You cannot afford such a system, for you are already know that a
  single mod_perl process sometimes serves thousands of requests before it is
  being put to death. So if the leaks add up on every request, your memory
  demands will be huge. Of course your code can be guilty for the memory
  leakages as well (check out the <CODE>Apache::Leak</CODE>
  module). Certainly you can lower the number of requests to be served over
  the process' life, but a performance degrade.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Sharing_Memory">Sharing Memory</A></H2></CENTER>
  <P>
  You want an OS with good sharing capabilities. As you have learned, if you
  preload the modules and scripts at the server startup, they are being
  shared between the spawned children, at least for a part of a process' life
  span, since memory pages are getting ``dirty'' and ceasing to be shared.
  This feature can save you up a lot of memory!!!
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Cost_and_Support">Cost and Support</A></H2></CENTER>
  <P>
  If you are into a big business you are not overly concerned about paying
  $1000+ for some fancy OS and to get the bundled support for it. But if your
  resources are low, you will look for a cheaper and free OSes. Free does not
  mean bad, it can be quite the opposite as we all either know from our own
  experience or read about in news. Free OSes can have and do have the best
  support you can find. It is very easy to understand - most of the people
  are not rich and will try to use a cheaper or free OS first if it does the
  work for them. Since it really fits their needs, many people keep using it
  and eventually know it quite good to provide a support for others in
  trouble. Why would they do it for free? For a real spirit of the first days
  of the Internet, when there was no commercial Internet and people helped
  each other, because someone helped them in first place. I was there, I was
  touched by that spirit and I will do anything to keep this spirit alive.
  
  <P>
  But, lets back to our world. We are living in a material world, and our
  bosses pay us to keep the systems running. So if you feel that you cannot
  provide the support yourself and you do not trust the available free
  resources, you must get an OS that have behind a company to pay for, and to
  blame for any difficulties you might experience in hope that your cries for
  help will be heard and answered. Your boss wants to be able to sue someone
  if the project has a problem. If you buy a product and the company claims
  support, then you have someone to sue. You do not have someone to sue other
  than getting fired yourself if you go with Open Source and it fails.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Discontinued_products">Discontinued products</A></H2></CENTER>
  <P>
  You have invested a lot into a developing of some proprietary software,
  that is bundled with the OS you were developing on and for. For example you
  write some mod_perl handler that takes an advantage of some proprietary
  features of the OS which make it faster and it will not run on any other
  OS. Things are under control, the performance is great and you sing from
  happiness. But... one day the company who wrote your beloved OS went
  bankrupt, which is not unlikely to happen nowadays. You have got stuck with
  their last masterpiece and no support! What are you going to do then?
  Invest more into a porting of the software to another OS...
  
  <P>
  Everyone can be hit by this mini disaster, so it is better to watch the
  background of the company when making your choice, but still you never know
  what will happen in the next minute. The OSes in this hazard group are
  developed completely by a single companies. Free OSes are probably more
  promising for a development is distributed between many companies and
  developers, so if a person who developed a really important part of the
  kernel lost an interest to continue, someone else will pick up the falling
  flag and continue from the same place. Of course if tomorrow some better
  project will show up, developers might migrate there and finally drop the
  development, but we are here not to let this happen.
  
  <P>
  But you are the one responsible for making the right decision...
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="OS_Releases">OS Releases</A></H2></CENTER>
  <P>
  Actively developed OSes are generally tries to keep the pace with the
  latest technology developments, and all the time optimize the kernel and
  other parts of OS to become better and faster. Nowadays, Internet and
  Networking in general are the most hot targets for system developers.
  Sometimes a simple OS upgrade to a latest stable version, can save you an
  expensive hardware upgrade. Also, remember that when you buy a new
  hardware, chances are that latest software will take the most out of it.
  Since while the existent software (drivers) might support the new product
  because of its back compatibility with previous products of the same family
  (brand), it might not take benefits of new features, so the you could spend
  much less money for the same functionality if you were to buy a previous
  model of the same product.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H1><A NAME="Hardware_Choosing">Hardware Choosing</A></H1></CENTER>
  <P>
  While I am not fond of the idea of updating this section of the mod_perl
  guide every day a new processor or memory type comes out, exactly like with
  OS choosing guidelines, I will only hint what should you look for and
  persuade you that sometimes the most expensive machine is not the one which
  provides the best performance.
  
  <P>
  Your demands are bound to many aspects and components. Let's discuss some
  of them.
  
  <P>
  In discussion course you might meet some unfamiliar terms, here are some of
  them:
  
  <UL>
  <P><LI>
  <P>
  Clustering - a bunch of machines connected together to perform one big or
  many small computational tasks in a reasonable time.
  
  <P><LI>
  <P>
  Balance loading - users can remember only a name of one of your machines -
  namely of your server, but it cannot stand the heavy load, so you use a
  clustering approach, distributing the load over a number of machines. The
  central server, the one users access when they type the name of the
  service, works as a dispatcher, by redirecting requests to the rest of the
  machines, sometimes it also collects the results and return them to the
  users. One of the advantages is that you can take one of the machines down
  for a repair or upgrade, and your service will still work - the main server
  will not dispatch the requests to the machine that was taken down. I will
  just say that there are many load balancing techniques.
  
  <P><LI>
  <P>
  NIC - Network Interface Card.
  
  <P><LI>
  <P>
  RAM - Random Access Memory
  
  <P><LI>
  <P>
  RAID - META
  
  </UL>
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Site_s_traffic">Site's traffic</A></H2></CENTER>
  <P>
  If you are building a fans' site but want to amaze your friends with
  mod_perl guest book, an old 486 machine will do. If you are into a serious
  business, it is very important to build a scalable server, so if your
  service is successful and becomes popular, you get your server's traffic
  doubled every few days, you should be ready to add more resources
  dynamically. While we can define the webserver scalability more precisely,
  the important thing is to make sure that you can add more power to your
  <CODE>webserver(s)</CODE> without investing additional money into a
  software developing (almost, you will need a software to connect your
  servers if you add more of them). It means that you should choose a
  hardware/OS that can talk to other machines and become a part of the
  cluster.
  
  <P>
  From the other hand if you prepare for a big traffic and buy a monster to
  do the work for you, what happens if your service does not prove to be as
  successful as you thought it would be. Then you spent too much money and
  meanwhile there were a new faster processors and other hardware components
  released, so you loose again.
  
  <P>
  Wisdom and prophecy , that's all it takes :)
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Cash">Cash</A></H2></CENTER>
  <P>
  Everybody knows that Internet is a big cash hole, whatever you throw in,
  hardly ever comes back. This is not always correct, but there is a lot of
  wisdom in these words. While you have to invest money to build a decent
  service, it can be cheaper! You can spend as much as 10 times more money on
  a new strong machine, but to get only a 10% improvement in performance.
  Remember that processor that was born 4 years ago is still very mighty.
  
  <P>
  If you really need a lot of power do not think about a strong machine
  (unless you have money to throw away), think about clustering and load
  balancing. You can probably buy 10 times more older but very cheap machines
  and have a 8 times more power, then purchasing only one single newest
  machine. Why is that? Because as I mentioned before generally the
  performance improve is very marginal while the price is much bigger.
  Because 10 machines will do a faster Hard Disk IO (Input/Output), then one
  single machine even if the disk is much faster. Yes, you have more
  administration overhead, but there is a chance you will have it anyway, for
  in a short time the machine you have just invested into will not stand the
  load and you will have to purchase more and to think how to implement the
  load balancing and file system distribution.
  
  <P>
  Why I am so convinced? Facts! Look at the most used services on the
  Internet: search engines, email servers and alike - most of them are using
  the clustering approach. While you are not always notice that, they do it
  by hiding the real implementation behind the proxy servers.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="IO_performance">IO performance</A></H2></CENTER>
  <P>
  If your service is IO bound (does a lot of read/write operations to your
  disk, remember that relational DataBases are sitting on disk as well) you
  need a very fast disk. So you should not spend money on Video card and
  monitor (monochrome card and 14`` B&amp;W will do for server
  configuration), but to look for the best price/performance disks. Of course
  you should ask around for a solid firm, whose HDs are not getting corrupted
  at all. With money in hand you should think about getting a RAID system
  (RAID is generally a box with many HDs, and it capable to read/write data
  much faster. and is protected against disk corruptions, for it duplicates
  the same data over a number of disks, so if one gets corrupted RAID detects
  it and data is still correct on the duplicated disks.) You must think about
  RAID or alike systems if you have an enormous data size to serve. (What is
  enormous data size nowadays?).
  
  <P>
  Ok, we have a fast disk, what's next? You need a fast disk controller. So
  ether you should use the one coming on your motherboard or you should plug
  a controller card if the one you have onboard is not good enough.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Memory">Memory</A></H2></CENTER>
  <P>
  How much RAM do you need? Nowadays, most chances you will hear: ``Memory is
  cheap, the more you buy the better''. But how much is enough? The answer
  pretty straightforward: ``You do not want your machine to swap''. When CPU
  needs to write something into a memory, but notices that it is already
  full, it takes the least frequently used memory pages (4k/page on average
  OS) and swap them out. Swapping out, means copying to the disk into a
  special partition or file called swap and deleting from the real memory.
  The another process asks CPU to bring another page, but CPU cannot find a
  memory page in the RAM, it was just swapped out, so it goes and brings it
  from the swap (swapping in). If memory is small, the swapping (in/out)
  happens too frequently, CPU becomes too busy to bring the pages in and out,
  HD working hard to read write the swapped out pages, and the whole
  performance is going down. Sometimes your swap partition can become full as
  well and your system might die.
  
  <P>
  How do you make a decision? You know what is the highest page request rate
  your service has and how long does an average request processing take. Now
  you can calculate how many servers do you need. Knowing the how big any of
  your servers can get, you know how much memory do you need. You probably
  need less memory that you have calculated if your OS supports memory
  sharing and you know how to deploy this feature (preloading the modules and
  scripts at server's startup). Do not forget that other essential system's
  processes need memory as well, so you should not plan for the webserver
  only, but to take into an account all processes to be run on your system.
  Remember that requests can be queued, so if you can afford your client to
  wait a few moments, while some process gets free to serve it, your numbers
  will be more correct, since you generally do not have the highest load, but
  you should be ready to bear the picks. So you need to reserve at least 20%
  of free memory for a pick situations. Many sites were reported to crash a
  few moments after some scooping news about them were posted, and unexpected
  number of requests suddenly came in. If you are about to announce something
  cool, be aware of possible consequences.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Internet_Connection">Internet Connection</A></H2></CENTER>
  <P>
  You have the best hardware you could get, but the service is still
  crawling. Make sure you have a fast Internet connection. Not _fast_ as your
  ISP claims it to be, but fast as it should be. The ISP might have a very
  good connection to the Internet, but to put many clients on the same line,
  and if these are heavy clients your traffic will have to share the same
  line, thus the speed is getting down. Think about dedicated connection and
  make sure it is truly dedicated, trust the ISP but check it!
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Bottlenecks">Bottlenecks</A></H2></CENTER>
  <P>
  The most important thing to understand is that you might use the most
  expensive components, but still get bad performance. Why? Let me introduce
  you to this annoying term: A bottleneck.
  
  <P>
  A machine is an aggregate of are many small and big components. Each one of
  them can become a bottleneck. If you have a fast processor but not a great
  deal of RAM, the processor will be under used waiting for the kernel to
  swap in and out the memory pages, because memory is too small to fit at
  least the most used ones. If you have a lot of memory and a fast processor
  and a fast disk, but a slow controller - the performance will be poor, and
  you will have wasted the money.
  
  <P>
  Of course use a NIC that does not create a bottleneck. If the NIC is slow,
  the whole service is slow.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Conclusion">Conclusion</A></H2></CENTER>
  <P>
  To use your money optimally, you have either to understand your hardware
  very well, so you will know what to pick or you should hire a knowledgeable
  hardware consultant or employee it on a constant basis, since your demands
  are probably being changed as time goes, and your HW should be adopted to
  every change you do.
  
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  	     The <a href="http://www.modperl.com/">
  	     <B>Writing Apache Modules with Perl and C</B></a>
  	     book can be purchased online from <a
  	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  	     and <a
  	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  	     Amazon.com</a>.
  
  	     <HR>
  	     [    <A HREF="performance.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="obvious.html">Next</A>      ]
  
  <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
  <TR ALIGN=CENTER VALIGN=TOP>
    <TD ALIGN=CENTER VALIGN=CENTER COLSPAN="3">
  	     <HR>
    </TD>
  </TR>
  <TR ALIGN=CENTER VALIGN=TOP>
    <TD ALIGN=CENTER VALIGN=CENTER>
      <B>
        <FONT SIZE=-1>
  	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  	     <BR>Last Modified at 05/17/1999
        </FONT>
      </B>
    </TD>
  
    <TD>
  	     <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg" ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
    </TD>
  
    <TD>
      <FONT SIZE=-2>
  	     Use of the Camel for Perl is <BR>
  	     a trademark of <A HREF="http://www.ora.com">O'Reilly &amp; Associates</A>,<BR>
               and is used by permission. 
      </FONT> 
    </TD>
  </TR>
  </TABLE></CENTER>
  
  </BODY>
  </HTML>
  	    
  
  
  1.1                  modperl-site/guide/security.html
  
  Index: security.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  <HTML>
  <HEAD>
     <TITLE>mod_perl guide: Protecting Your Site</TITLE>
     <META NAME="GENERATOR" CONTENT="Mozilla/3.04Gold (X11; I; AIX 4.1) [Netscape]">
     <META NAME="Author" CONTENT="Bekman Stas">
     <META NAME="Description" CONTENT="All Apache/Perl related information: Hints, 
  Guidelines, Scenarios and Troubleshottings">
     <META NAME="keywords" CONTENT="mod_perl modperl perl apache cgi webserver speed 
  fast guide mod_perl apache guide help info faq mod_perl installation cgi
  troubleshooting help no sex speedup free open source OSS mod_perl apache guide">
  </HEAD>
       <LINK REL=STYLESHEET TYPE="text/css"
          HREF="style.css" TITLE="refstyle">
       <style type="text/css">
       <!-- 
          @import url(style.css);
       -->
       
       </style>
  <BODY TEXT="#000000" BGCOLOR="#E0FFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
  <A NAME="toc"></A>
  <H1 ALIGN=CENTER>
  <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A>
  <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  Protecting Your Site</H1>
  <HR WIDTH="100%">
  	    [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]<HR><!-- INDEX BEGIN -->
  <P><B><FONT SIZE=-1>Table of Contents:</FONT></B></P>
  <UL>
  
  	<LI><A HREF="#An_Importance_of_Your_site_s_Sec">An Importance of Your site's Security</A>
  	<LI><A HREF="#Illustrated_security_scenarios">Illustrated security scenarios</A>
  	<UL>
  
  		<LI><A HREF="#Non_authenticated_access_for_int">Non authenticated access for internal IPs, but authenticated by external IPs</A>
  	</UL>
  
  </UL>
  <!-- INDEX END -->
  
  <HR>
  
  	     The <a href="http://www.modperl.com/">
  	     <B>Writing Apache Modules with Perl and C</B></a>
  	     book can be purchased online from <a
  	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  	     and <a
  	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  	     Amazon.com</a>.
  
  	     <HR>
  
  	      <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <P>
  <CENTER><H1><A NAME="An_Importance_of_Your_site_s_Sec">An Importance of Your site's Security</A></H1></CENTER>
  <P>
  Lets state it, your site or service can easily become a target for some
  Internet ``terrorists'', for something that you said, because of success
  your site has, or for no obvious reason. Your site can be broken in, the
  whole data can be deleted, some important information can be stolen, or a
  much easier the site can be turned into a useless with a _simple_ Services
  Deny Attack. What can you do about it? Protect yourself! Whatever you do,
  your site will be still vulnerable as long as you are connected to the
  network. Cut the connections down, turn off your machine and put it into a
  safe - now it is more protected, but very useless.
  
  <P>
  Let's first get acquainted with security related terminology:
  
  <DL>
  <P><DT><STRONG><A NAME="item_Authentication">Authentication</A></STRONG><DD>
  <P>
  When you want to make sure that a user is the one he claims to be, you
  generally ask her for a username and a password, right? Once you have both:
  the username and the password, you can validate them in your database of
  username/password pairs, and if both match - you know that user has passed
  the <STRONG>Authentication</STRONG> stage. From this moment on if you keep the session open all you need is to
  remember the username.
  
  <P><DT><STRONG><A NAME="item_Authorization">Authorization</A></STRONG><DD>
  <P>
  You might want to let user <STRONG>foo</STRONG> to access to some resource, but restrict her from accessing to another
  resource, which in turn is accessible only for user <STRONG>bar</STRONG>. The process of checking access rights is being called <STRONG>Authorization</STRONG>. For <STRONG>Authorization</STRONG> all you need is a username or some other attribute you authorize upon. For
  example you can authorize upon IP number, for example allowing only your
  local users to use some service. Be warned that IP numbers or session_ids
  can be spoofed, and that is why you would not do <STRONG>Authorization</STRONG>
  without <STRONG>Authentication</STRONG>.
  
  <P>
  Actually you are familiar with both terms for a long time - when you telnet
  to your account on some machine you go through a login process (<STRONG>Authentication</STRONG>). When you try to read some file on your file systems the kernel checks
  first the permissions on this file. (you go through <STRONG>Authorization</STRONG>). That's why you could hear about <STRONG>Access
  control</STRONG> which is another name for the same term.
  
  </DL>
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H1><A NAME="Illustrated_security_scenarios">Illustrated security scenarios</A></H1></CENTER>
  <P>
  I am going to present some real world security requirements and their
  implementations.
  
  <P>
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  <CENTER><H2><A NAME="Non_authenticated_access_for_int">Non authenticated access for internal IPs, but authenticated by external IPs</A></H2></CENTER>
  <P>
  If you run an <STRONG>Extranet</STRONG> (Very similar to <STRONG>Intranet</STRONG> but partly accessible from the outside, e.g. read only) you might want to
  let your internal users an non-restricted access to your web server, but if
  these users are calling from the outside of your organization you want to
  make sure these are your employees.
  
  <P>
  First one is achieved very simply using the IP patterns of the organization
  in a Perl Access Handler in an <CODE>.htaccess file</CODE>, which consequently sets the REMOTE_USER environmental variable to a
  generic organization's username, so that certain scripts which rely on
  <CODE>REMOTE_USER</CODE> environment variable will work properly.
  
  <P>
  The second one should detect that the IP comes from the outside and user
  should be authenticated, before allowed in.
  
  <P>
  As you understood this is a pure authentication problem. Once user passes
  the authentication, either bypassing it because of his IP address, or after
  entering correct login/password pair, the
  <CODE>REMOTE_USER</CODE> variable is being set. Now having it set we can talk about authorization.
  
  <P>
  OK let's see the implementation. First we modify the &lt;httpd.conf&gt;:
  
  <P>
  <PRE>  PerlModule My::Auth
    
    &lt;Location /private&gt;
      PerlAccessHandler My::Auth::access_handler
      PerlSetVar Intranet &quot;100.100.100.1 =&gt; userA, 100.100.100.2 =&gt; userB&quot;
      PerlAuthenHandler My::Auth::authen_handler
      AuthName realm
      AuthType Basic
      Require valid-user
    &lt;/Location&gt;
  </PRE>
  <P>
  Now the code of My/Auth.pm:
  
  <P>
  <PRE>    sub access_handler {
  </PRE>
  <P>
  <PRE>        my $r = shift;
  </PRE>
  <P>
  <PRE>        unless ($r-&gt;some_auth_required) {
                  $r-&gt;log_reason(&quot;No authentication has been configured&quot;);
                  return FORBIDDEN;
          }
          # get list of IP addresses
          my %ips = split /\s*(?:=&gt;|,)\s*/, $r-&gt;dir_config(&quot;Intranet&quot;);
  </PRE>
  <P>
  <PRE>        if (my $user = $ips{$r-&gt;connection-&gt;remote_ip}) {
  </PRE>
  <P>
  <PRE>                # update connection record
                  $r-&gt;connection-&gt;user($user);
  </PRE>
  <P>
  <PRE>                # do not ask for a password
                  $r-&gt;set_handlers(PerlAuthenHandler =&gt; [\&amp;OK]);
          }
          return OK;
      }
      
      sub authen_handler {
  </PRE>
  <P>
  <PRE>        my $r = shift;
  </PRE>
  <P>
  <PRE>        # get user's authentication credentials
          my ($res, $sent_pw) = $r-&gt;get_basic_auth_pw;
          return $res if $res != OK;
          my $user = $r-&gt;connection-&gt;user;
  </PRE>
  <P>
  <PRE>        # authenticate through DBI
          my $reason = authen_dbi ($r, $user, $sent_pw, $niveau);
  </PRE>
  <P>
  <PRE>        if ($reason) {
                  $r-&gt;note_basic_auth_failure;
                  $r-&gt;log_reason ($reason, $r-&gt;uri);
                  return AUTH_REQUIRED;
          }
          return OK;
      }
      
      sub authen_dbi{
        my ($r, $user, $sent_pw, $niveau) = @_;
  </PRE>
  <P>
  <PRE>      # validate username/passwd
  </PRE>
  <P>
  <PRE>      return 0 if (*PASSED*)
          
        return &quot;Failed for X reason&quot;;
  </PRE>
  <P>
  <PRE>    }
  </PRE>
  <P>
  Either implement your <CODE>authen_dbi()</CODE> routine, or replace
  <CODE>authen_handler()</CODE> with any authentication handler such as
  <CODE>Apache::AuthenDBI</CODE>.
  
  <P>
  <CODE>access_handler()</CODE> sets <CODE>REMOTE_USER</CODE> to be either <CODE>userA</CODE> or
  <CODE>userB</CODE> according on the IP, if non matched <CODE>PerlAuthenHandler</CODE> will be not set to OK, and the next Authentication stage will ask the user
  for a login and password.
  
  <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  	     The <a href="http://www.modperl.com/">
  	     <B>Writing Apache Modules with Perl and C</B></a>
  	     book can be purchased online from <a
  	     href="http://www.ora.com/catalog/wrapmod/">O'Reilly </a>
  	     and <a
  	     href="http://www.amazon.com/exec/obidos/ASIN/156592567X/writinapachemodu">
  	     Amazon.com</a>.
  
  	     <HR>
  	     [    <A HREF="warnings.html">Prev</A> |      <A HREF="index.html">Main Page</A> | <A HREF="databases.html">Next</A>      ]
  
  <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
  <TR ALIGN=CENTER VALIGN=TOP>
    <TD ALIGN=CENTER VALIGN=CENTER COLSPAN="3">
  	     <HR>
    </TD>
  </TR>
  <TR ALIGN=CENTER VALIGN=TOP>
    <TD ALIGN=CENTER VALIGN=CENTER>
      <B>
        <FONT SIZE=-1>
  	     Written by <A HREF="help.html#This_document_s_Author">Stas Bekman</A>.
  	     <BR>Last Modified at 05/17/1999
        </FONT>
      </B>
    </TD>
  
    <TD>
  	     <A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg" ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
    </TD>
  
    <TD>
      <FONT SIZE=-2>
  	     Use of the Camel for Perl is <BR>
  	     a trademark of <A HREF="http://www.ora.com">O'Reilly &amp; Associates</A>,<BR>
               and is used by permission. 
      </FONT> 
    </TD>
  </TR>
  </TABLE></CENTER>
  
  </BODY>
  </HTML>
  	    
  
  

Mime
View raw message