cvs commit: modperl-docs/src/docs/1.0/guide scenario.pod Changes.pod

2003-12-22 Thread stas
stas2003/12/21 18:24:22

  Modified:src/docs/1.0/guide scenario.pod Changes.pod
  Log:
  Several handy mod_rewrite rules
  Submitted by: Fred Moyer [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.10  +49 -1 modperl-docs/src/docs/1.0/guide/scenario.pod
  
  Index: scenario.pod
  ===
  RCS file: /home/cvs/modperl-docs/src/docs/1.0/guide/scenario.pod,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -u -r1.9 -r1.10
  --- scenario.pod  31 Jul 2002 14:44:19 -  1.9
  +++ scenario.pod  22 Dec 2003 02:24:22 -  1.10
  @@ -1653,6 +1653,11 @@
   
   =head1 mod_rewrite Examples
   
  +Example code for using mod_rewrite with mod_perl application
  +servers. Several examples were taken from the mailing list.
  +
  +=head2 Rewriting Requests Based on File Extension
  +
   In the mod_proxy + mod_perl servers scenario, CProxyPass was used to
   redirect all requests to the mod_perl server, by matching the
   beginning of the relative URI (e.g. I/perl). What should you do if
  @@ -1686,16 +1691,20 @@
   It says: log all the rewrites thru the pipe to the Crotatelogs
   utility which will rotate the logs every 2 hours (86400 secs).
   
  -More examples:
  +=head2 Internet Exporer 5 favicon.ico 404
   
   Redirect all those IE5 requests for Ifavicon.ico to a central image:
   
 RewriteRule .*favicon.ico /wherever/favicon.ico [PT,NS]
   
  +=head2 Hiding Extensions for Dynamic Pages
  +
   A quick way to make dynamic pages look static:
   
 RewriteRule ^/wherever/([a-zA-Z]+).html /perl-bin/$1.cgi [PT]
   
  +=head2 Serving Static Content Locally and Rewriting Everything Else
  +
   Instead of keeping all your Perl scripts in I/perl and your static
   content everywhere else, you could keep your static content in special
   directories and keep your Perl scripts everywhere else.  You can still
  @@ -1737,6 +1746,45 @@
 RewriteRule ^/(images|style) - [L]
 RewriteRule ^/(.*) http://www.example.com:8080/$1 [P]
 ProxyPassReverse / http://www.example.com/
  +
  +=head2 Upgrading mod_perl Heavy Application Instances
  +
  +When using a light/heavy separation method one of the challenges of
  +running a production environment is being able to upgrade to newer
  +versions of mod_perl or your own application. The following method can
  +be used without having to do a server restart.
  +
  +Add the following rewrite rule to your httpd.conf file:
  +
  +  RewriteEngine On
  +  RewriteMap maps txt:/etc/httpd.maps
  +  RewriteRule ^(.*) http://${maps:appserver}$1 [proxy]
  +
  +Create the file /etc/httpd.maps and add the following entry:
  +
  +  appserver foo.com:
  +
  +Mod_rewrite rereads (or checks the mtime of) the file on every request
  +so the change takes effect immediately. To seamlessly upgrade your
  +application server to a new version, install a new version on a
  +different port. After checking for a quality installation, edit
  +/etc/httpd.maps to point to the new server. After the file is written
  +the next request the server processes will be redirected to the new
  +installation.
  +
  +=head2 Blocking IP Addresses
  +
  +The following rewrite code blocks IP addresses:
  +
  +  RewriteCond /web/site/var/blocked/REMOTE_ADDR-%{REMOTE_ADDR} -f
  +  RewriteRule .* http://YOUR-HOST-BLOCKED-FOR-EXCESSIVE-CONSUMPTION 
[redirect,last]
  +
  +To block IP address 10.1.2.3, simply touch
  +
  +  /web/site/var/blocked/REMOTE_ADDR-10.1.2.3
  +
  +This has an advantage over Apache parsing a long file of addresses in
  +that the OS is better at a file lookup.
   
   =head1 Caching in mod_proxy
   
  
  
  
  1.39  +7 -0  modperl-docs/src/docs/1.0/guide/Changes.pod
  
  Index: Changes.pod
  ===
  RCS file: /home/cvs/modperl-docs/src/docs/1.0/guide/Changes.pod,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -u -r1.38 -r1.39
  --- Changes.pod   1 Dec 2003 20:23:59 -   1.38
  +++ Changes.pod   22 Dec 2003 02:24:22 -  1.39
  @@ -11,6 +11,13 @@
   
   =head1 Ongoing
   
  +* scenario.pod:
  +
  + o Several handy mod_rewrite rules (summarized by Fred Moyer fred
  +   \at\ taperfriendlymusic.org)
  +  - Upgrading mod_perl Heavy Application Instances [Rob Nagler]
  +  - Blocking IP Addresses [Randal L. Schwartz]
  +
   * porting.pod
   
o revamp the Exposing Apache::Registry secrets section to use
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: modperl-docs/src/download index_top.html

2003-12-22 Thread stas
stas2003/12/22 11:59:20

  Modified:src/download index_top.html
  Log:
  1.99_12 was released
  
  Revision  ChangesPath
  1.16  +1 -1  modperl-docs/src/download/index_top.html
  
  Index: index_top.html
  ===
  RCS file: /home/cvs/modperl-docs/src/download/index_top.html,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -u -r1.15 -r1.16
  --- index_top.html10 Nov 2003 20:30:26 -  1.15
  +++ index_top.html22 Dec 2003 19:59:20 -  1.16
  @@ -14,7 +14,7 @@
   brbr
   /li
   
  -limod_perl 2.0 (in development): Version 1.99_11 - November 10, 
2003br
  +limod_perl 2.0 (in development): Version 1.99_12 - Decemeber 22, 
2003br
   a 
href=http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz;Download/a |
   a 
href=http://perl.apache.org/dist/mod_perl-2.0-current;Browse/a |
   a 
href=http://perl.apache.org/dist/mod_perl-2.0-current/Changes;Changes/a |
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: modperl-docs/src/products apache-modules.pod

2003-12-22 Thread stas
stas2003/12/22 14:30:34

  Modified:src/products apache-modules.pod
  Log:
  ported: Apache::Scoreboard and Apache::VMonitor
  new: Apache::Filter::HTTPHeadersFixup
  
  Revision  ChangesPath
  1.18  +24 -22modperl-docs/src/products/apache-modules.pod
  
  Index: apache-modules.pod
  ===
  RCS file: /home/cvs/modperl-docs/src/products/apache-modules.pod,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- apache-modules.pod17 Dec 2003 08:51:26 -  1.17
  +++ apache-modules.pod22 Dec 2003 22:30:34 -  1.18
  @@ -155,26 +155,30 @@
   ported but not listed here, please contact Lthe modperl
   list|maillist::modperl, so we can update this information:
   
  -  Module Name Required Dist Package
  -  -
  -  Apache::ASPApache-ASP-2.55
  -  Apache::AuthExpire Apache-AuthExpire-0.38
  -  Apache::AuthNetLDAPApache-AuthNetLDAP-0.25
  -  Apache::AuthPerLDAPApache-AuthPerLDAP-2.01
  -  Apache::AuthenNIS  Apache-AuthenNIS-0.11
  -  Apache::AuthenNTLM Apache-AuthenNTLM-2.04
  -  Apache::AuthenPasswd   Apache-AuthenPasswd-0.12
  -  Apache::AuthenSmb  Apache-AuthenSmb-0.70
  -  Apache::AuthzNIS   Apache-AuthzNIS-0.11
  -  Apache::AuthzNetLDAP   Apache-AuthzNetLDAP-0.07
  -  Apache::AuthzPasswdApache-AuthzPasswd-0.11
  -  Apache::Clean  Apache-Clean-2.00_4
  -  Apache::GeoIP  Apache-GeoIP-1.215
  -  Apache::PARApache-PAR-0.30
  -  Apache::Peek   Apache-Peek-1.01
  -  Apache::SessionManager Apache-SessionManager 1.00
  -  CGICGI.pm-2.93
  -  CGI::CookieCGI.pm-2.93 (comes in the CGI dist)
  +  Module NameRequired Dist Package
  +  
  +  Apache::ASP   Apache-ASP-2.55
  +  Apache::AuthExpireApache-AuthExpire-0.38
  +  Apache::AuthNetLDAP   Apache-AuthNetLDAP-0.25
  +  Apache::AuthPerLDAP   Apache-AuthPerLDAP-2.01
  +  Apache::AuthenNIS Apache-AuthenNIS-0.11
  +  Apache::AuthenNTLMApache-AuthenNTLM-2.04
  +  Apache::AuthenPasswd  Apache-AuthenPasswd-0.12
  +  Apache::AuthenSmb Apache-AuthenSmb-0.70
  +  Apache::AuthzNIS  Apache-AuthzNIS-0.11
  +  Apache::AuthzNetLDAP  Apache-AuthzNetLDAP-0.07
  +  Apache::AuthzPasswd   Apache-AuthzPasswd-0.11
  +  Apache::Clean Apache-Clean-2.00_4
  +  Apache::Filter::HTTPHeadersFixup  Apache-Filter-HTTPHeadersFixup-0.01
  +  Apache::GeoIP Apache-GeoIP-1.215
  +  Apache::PAR   Apache-PAR-0.30
  +  Apache::Peek  Apache-Peek-1.01
  +  Apache::ScoreboardApache-Scoreboard-2.01
  +  Apache::SessionManagerApache-SessionManager 1.00
  +  Apache::VMonitor  Apache-VMonitor-2.0
  +  CGI   CGI.pm-2.93
  +  CGI::Cookie   CGI.pm-2.93 (comes in the CGI dist)
  +
   
   
   =head1 Porting in Process
  @@ -192,8 +196,6 @@
 --
 Apache::MP3Stas Bekman stas AT stason.org
Clemens Schrimpe csch AT Kiez.NET
  -  Apache::Scoreboard Stas Bekman stas AT stason.org
  -  Apache::VMonitor   Stas Bekman stas AT stason.org
 Apache::Requesthttp://httpd.apache.org/apreq/
 Apache::Language   Philippe M. Chiasson gozer AT cpan.org
 Apache::AutoIndex  Philippe M. Chiasson gozer AT cpan.org
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]