These are the typical Apache directives you need to set up a
development site for pearweb (this PHP installation has PEAR stuff
installed in /usr/share/pear):

<VirtualHost *>
 ServerName pear.localdomain

 DocumentRoot /path/to/pearweb/public_html
 DirectoryIndex index.php index.html

# Enable the following if you want to use SSL
#
# SSLEngine On
# SSLCertificateFile /usr/local/apache2/ssl/pear.php.net.crt
# SSLCertificateKeyFile /usr/local/apache2/ssl/pear.php.net.key
# SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

 SetEnv Google_API_Key "ABQIAAAAjPqDvnoTwt1l2d9kE7aeSRSaX3uuPis-gsi6PocQln0mfq-TehSSt5OZ9q0OyzKSOAfNu8NuLlNgWA"

 php_value include_path .:/path/to/pearweb/include:/usr/share/pear
 php_value auto_prepend_file pear-prepend.php
 php_flag magic_quotes_gpc off
 php_flag magic_quotes_runtime off
 php_flag register_globals off

 ErrorDocument 404 /error/404.php

 Alias /package /usr/local/www/pearweb/public_html/package-info.php
 Alias /user    /usr/local/www/pearweb/public_html/account-info.php
 Alias /sidebar/pear.gif /usr/local/www/pearweb/public_html/gifs/pear_item.gif
 Alias /distributions/manual/chm /var/lib/pear/chm
 Alias /reference /var/lib/pear/apidoc

 RedirectPermanent /download-docs.php          http://pear.php.net/manual/
 RedirectPermanent /rss.php                    http://pear.php.net/feeds/latest.rss
 RedirectPermanent /weeklynews.php             http://pear.php.net/
 RedirectPermanent /support.php                http://pear.php.net/support/
 RedirectPermanent /credits.php                http://pear.php.net/about/credits.php
 RedirectPermanent /pepr/pepr-overview.php     http://pear.php.net/pepr/
 RedirectPermanent /faq.php                    http://pear.php.net/manual/en.faq.php
 RedirectPermanent /doc/index.php              http://pear.php.net/manual/en/

 # xmlrpc.php was removed 1 Jan 2008 and won't come back
 Redirect gone /xmlrpc.php

 RewriteEngine On

 #
 # Rewrite all PHPUnit traffic to its new home
 #
 RewriteRule   /package/PHPUnit(.*) http://phpunit.de/ [R=301, NC]

 #
 # Rewriting rules for the RSS feeds
 #
 RewriteRule   /feeds/(.+)\.rss$ /feeds/feeds.php?type=$1

 #
 # Rewriting rule for the API documentation
 #
 RewriteRule   /package/([a-zA-Z0-9_]+)/docs/(.+)($/|$) /reference/$1-$2 [PT]

 #
 # Rewriting rule for the Bug system
 #
 RewriteRule   /bugs/([0-9]+)/*$ /bugs/bug.php?id=$1 [R]

 #
 # Rewriting rule for the manual
 # throw pecl doc people to the php manual
 #
 RewriteRule   /manual/[a-z]{2}/pecl.([a-zA-Z0-9_-]+)\.php$ http://www.php.net/$1 [R=301]

 SetEnvIf User-Agent "MS Search 4\.0 Robot\)$" badrobot

 <Directory />
  order deny,allow
  deny from env=badrobot
 </Directory>

 <Location /get>
  ForceType application/x-httpd-php

  Deny From 194.51.105.35
 </Location>

 <Location /manual>
  ErrorDocument 404 /error/404-manual.php
 </Location>

 <Location /bugs/include>
    deny from all
 </Location>

 <Location /trackback>
    DirectoryIndex trackback.php
 </Location>

</VirtualHost>
