sethandler
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 31
zeMail 1.0
zeMail is a minimalist webmail package written in Mason. more>>
zeMail is a minimalist webmail package written in Mason. It implements the basic features one would expect from an IMAP mail client, displaying folder and message contents, handling attachments and allowing you to move, mark and purge your messages.
zeMail package is written in plain HTML, and uses JavaScript only to reduce the click count, it will work perfectly with scripting disabled. Compared to the modern AJAX trend, this web mail package is designed to work everywhere.
Installation:
Download and unpack the tarball. Copy the directory lib/Zentus into your Perl inc. path (/usr/local/lib/perl/5.8.4 on Debian).
Copy the contents of mason/ into the desired subdirectory of your Apache htdocs directory or virtual host. Then add the following to your httpd.conf:
PerlModule Zentus::Mail::Connection
PerlModule Zentus::Mail::AttachmentHandler
PerlModule HTML::Mason::ApacheHandler
PerlModule Apache::Session::File
PerlModule Text::Autoformat
< Location / >
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
DirectoryIndex folder
< /Location >
< Location /attachment >
SetHandler perl-script
PerlHandler Zentus::Mail::AttachmentHandler
< /Location >
< LocationMatch "(/icons|/images|.ico|.html|.txt)" >
SetHandler default-handler
< /Location >
< LocationMatch "(autohandler|dhandler|.inc)" >
SetHandler None
< /Location >
This code segment can be added as-is if you intend to devote a VirtualHost to zeMail, otherwise prefix a directory name in the < Location > and < LocationMatch > tags.
Now install the necessary Perl modules from CPAN:
cpan -i HTML::Mason # or deb: libhtml-mason-perl
cpan -i Apache::Session # or deb: libapache-session-perl
cpan -i DB_File::Lock # or deb: libdb-file-lock-perl
cpan -i Text::Autoformat # or deb: libtext-autoformat-perl
cpan -i HTML::FormatText # or deb: libhtml-format-perl
cpan -i Net::IMAP::Simple # (needed really in name only,
# to be removed in next release)
You may have to create the temporary directory manually:
mkdir /tmp/zemail
chown www /tmp/zemail
Now restart your Apache and your are good to go.
Enhancements:
- Supports all basic forms of email, strips out MIME, displays attached images inline, and lets you download the rest.
<<lesszeMail package is written in plain HTML, and uses JavaScript only to reduce the click count, it will work perfectly with scripting disabled. Compared to the modern AJAX trend, this web mail package is designed to work everywhere.
Installation:
Download and unpack the tarball. Copy the directory lib/Zentus into your Perl inc. path (/usr/local/lib/perl/5.8.4 on Debian).
Copy the contents of mason/ into the desired subdirectory of your Apache htdocs directory or virtual host. Then add the following to your httpd.conf:
PerlModule Zentus::Mail::Connection
PerlModule Zentus::Mail::AttachmentHandler
PerlModule HTML::Mason::ApacheHandler
PerlModule Apache::Session::File
PerlModule Text::Autoformat
< Location / >
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
DirectoryIndex folder
< /Location >
< Location /attachment >
SetHandler perl-script
PerlHandler Zentus::Mail::AttachmentHandler
< /Location >
< LocationMatch "(/icons|/images|.ico|.html|.txt)" >
SetHandler default-handler
< /Location >
< LocationMatch "(autohandler|dhandler|.inc)" >
SetHandler None
< /Location >
This code segment can be added as-is if you intend to devote a VirtualHost to zeMail, otherwise prefix a directory name in the < Location > and < LocationMatch > tags.
Now install the necessary Perl modules from CPAN:
cpan -i HTML::Mason # or deb: libhtml-mason-perl
cpan -i Apache::Session # or deb: libapache-session-perl
cpan -i DB_File::Lock # or deb: libdb-file-lock-perl
cpan -i Text::Autoformat # or deb: libtext-autoformat-perl
cpan -i HTML::FormatText # or deb: libhtml-format-perl
cpan -i Net::IMAP::Simple # (needed really in name only,
# to be removed in next release)
You may have to create the temporary directory manually:
mkdir /tmp/zemail
chown www /tmp/zemail
Now restart your Apache and your are good to go.
Enhancements:
- Supports all basic forms of email, strips out MIME, displays attached images inline, and lets you download the rest.
Download (0.079MB)
Added: 2006-01-26 License: BSD License Price:
1366 downloads
Net::CyanChat 0.04
Net::CyanChat is a Perl interface for connecting to Cyan Worlds chat room. more>>
Net::CyanChat is a Perl interface for connecting to Cyan Worlds chat room.
SYNOPSIS
use Net::CyanChat;
my $cyan = new Net::CyanChat (
host => cho.cyan.com, # default
port => 1812, # main port--1813 is for testing
proto => 1, # use protocol 1.0
refresh => 60, # ping rate (default)
);
# Set up handlers.
$cyan->setHandler (foo => &bar);
# Connect
$cyan->start();
Net::CyanChat is a Perl module for object-oriented connections to Cyan Worlds, Inc.s chat room.
<<lessSYNOPSIS
use Net::CyanChat;
my $cyan = new Net::CyanChat (
host => cho.cyan.com, # default
port => 1812, # main port--1813 is for testing
proto => 1, # use protocol 1.0
refresh => 60, # ping rate (default)
);
# Set up handlers.
$cyan->setHandler (foo => &bar);
# Connect
$cyan->start();
Net::CyanChat is a Perl module for object-oriented connections to Cyan Worlds, Inc.s chat room.
Download (0.020MB)
Added: 2007-03-23 License: Perl Artistic License Price:
947 downloads
MasonX::Resolver::PAR 0.2
MasonX::Resolver::PAR is a Perl module to get mason components from a PAR file. more>>
MasonX::Resolver::PAR is a Perl module to get mason components from a PAR file.
SYNOPSIS
(Inside a web.conf)
PerlModule HTML::Mason::ApacheHandler
PerlModule MasonX::Resolver::PAR
< Location /myapp >
SetHandler perl-script
PerlSetVar MasonParStaticDirectoryIndex index.htm
PerlAddVar MasonParStaticnDirectoryIndex index.html
PerlSetVar MasonParFile ##PARFILE##
PerlSetVar MasonResolverClass MasonX::Resolver::PAR
PerlHandler HTML::Mason::ApacheHandler
< /Location >
This is a custom Mason Resolver which loads its content from a PAR archive. This is meant to be used in conjunction with Apache::PAR. Read the description for this module first. The web.conf above should be inside the par archive as specified by Apache::PAR. It will be appended to your apache conf.
<<lessSYNOPSIS
(Inside a web.conf)
PerlModule HTML::Mason::ApacheHandler
PerlModule MasonX::Resolver::PAR
< Location /myapp >
SetHandler perl-script
PerlSetVar MasonParStaticDirectoryIndex index.htm
PerlAddVar MasonParStaticnDirectoryIndex index.html
PerlSetVar MasonParFile ##PARFILE##
PerlSetVar MasonResolverClass MasonX::Resolver::PAR
PerlHandler HTML::Mason::ApacheHandler
< /Location >
This is a custom Mason Resolver which loads its content from a PAR archive. This is meant to be used in conjunction with Apache::PAR. Read the description for this module first. The web.conf above should be inside the par archive as specified by Apache::PAR. It will be appended to your apache conf.
Download (0.017MB)
Added: 2007-03-22 License: Perl Artistic License Price:
946 downloads
mod_xmltime 1.1
mod_xmltime produces an XML timestamp for +1200 to -1200 UTC Zones. more>>
mod_xmltime produces an XML timestamp for +1200 to -1200 UTC Zones. mod_xmltime creates an XML Date/Time graph.
Installation:
- Verify that you have a late version of libxml2.
- Verify that apxs is on your path (it should have installed with your Apache installation).
- Download mod_xmltime.tar.gz.
- Un-tar the file (i.e. tar -zxf mod_xmltime.tar.gz )
- enter the mod_xmltime directory (i.e. cd path/to/mod_xmltime)
- If your lib and include directories are NOT in /usr/local, type make WITH_PREFIX=/PATH/TO/PREFIX all otherwise type make all
- Switch user (su) to a user with permission to write into /path/to/apache/installation (i.e. root)
- Type make install
- Verify that the following items are in your httpd.conf file:
- LoadModule xobjex_module libexec/apache/mod_xmltime.so
- AddModule mod_xmltime.c
< IfModule mod_xmltime.c >
< FilesMatch "timestamp.xml" >
SetHandler xmltime-handler
< /FilesMatch >
< /IfModule >
- Restart your Apache httpd or make reload, instead.
<<lessInstallation:
- Verify that you have a late version of libxml2.
- Verify that apxs is on your path (it should have installed with your Apache installation).
- Download mod_xmltime.tar.gz.
- Un-tar the file (i.e. tar -zxf mod_xmltime.tar.gz )
- enter the mod_xmltime directory (i.e. cd path/to/mod_xmltime)
- If your lib and include directories are NOT in /usr/local, type make WITH_PREFIX=/PATH/TO/PREFIX all otherwise type make all
- Switch user (su) to a user with permission to write into /path/to/apache/installation (i.e. root)
- Type make install
- Verify that the following items are in your httpd.conf file:
- LoadModule xobjex_module libexec/apache/mod_xmltime.so
- AddModule mod_xmltime.c
< IfModule mod_xmltime.c >
< FilesMatch "timestamp.xml" >
SetHandler xmltime-handler
< /FilesMatch >
< /IfModule >
- Restart your Apache httpd or make reload, instead.
Download (0.009MB)
Added: 2006-04-05 License: GPL (GNU General Public License) Price:
1297 downloads
HTML::EmbperlObject 1.3.6
HTML::EmbperlObject is a Perl module that extents HTML::Embperl for building whole website with reusable components and objects. more>>
HTML::EmbperlObject is a Perl module that extents HTML::Embperl for building whole website with reusable components and objects.
SYNOPSIS
< Location /foo >
PerlSetEnv EMBPERL_OBJECT_BASE base.htm
PerlSetEnv EMBPERL_FILESMATCH ".htm.?|.epl$"
SetHandler perl-script
PerlHandler HTML::EmbperlObject
Options ExecCGI
< /Location >
HTML::EmbperlObject allows you to build object-oriented (OO) websites using HTML components which implement inheritance via subdirectories. This enables elegant architectures and encourages code reuse. The use of inheritance also enables a website-wide "look and feel" to be specified in a single HTML file, which is then used as a template for every other page on the site. This template can include other modules which can be overridden in subdirectories; even the template itself can be overridden. In a nutshell, EmbperlObject makes the design of large websites much more intuitive, allowing object-oriented concepts to be utilised to the fullest while staying within the "rapid application development" model of Perl and HTML.
HTML::EmbperlObject is basicly a mod_perl handler or could be invoked offline and helps you to build a whole page out of smaller parts. Basicly it does the following:
When a request comes in, a page, which name is specified by EMBPERL_OBJECT_BASE, is searched in the same directory as the requested page. If the pages isnt found, EmbperlObject walking up the directory tree until it finds the page, or it reaches DocumentRoot or the directory specified by EMBPERL_OBJECT_STOPDIR.
This page is then called as frame for building the real page. Addtionaly EmbperlObject sets the search path to contain all directories it had to walk before finding that page. If EMBPERL_OBJECT_STOPDIR is set the path contains all directories up to the in EMBPERL_OBJECT_STOPDIR specified one.
This frame page can now include other pages, using the HTML::Embperl::Execute method. Because the search path is set by EmbperlObject the included files are searched in the directories starting at the directory of the original request walking up thru the directory which contains the base page. This means that you can have common files, like header, footer etc. in the base directory and override them as necessary in the subdirectory.
To include the original requested file, you need to call Execute with a * as filename. To call the the same file, but in an upper directory you can use the special shortcut ../*.
Additionaly EmbperlObject sets up a inherence hierachie for you: The requested page inherit from the base page and the base page inherit from a class which could be specified by EMBPERL_OBJECT_HANDLER_CLASS, or if EMBPERL_OBJECT_HANDLER_CLASS is not set, from HTML::Embperl::Req. That allows you to define methods in base page and overwrite them as neccessary in the original requested files.
For this purpose a request object, which is blessed into the package of the requested page, is given as first parameter to each page (in $_[0]). Because this request object is a hashref, you can also use it to store additional data, which should be available in all components. Embperl does not use this hash itself, so you are free to store whatever you want. Methods can be ordinary Perl subs (defined with [! sub foo { ... } !] ) or Embperl subs (defined with [$sub foo $] .... [$endsub $]) .
<<lessSYNOPSIS
< Location /foo >
PerlSetEnv EMBPERL_OBJECT_BASE base.htm
PerlSetEnv EMBPERL_FILESMATCH ".htm.?|.epl$"
SetHandler perl-script
PerlHandler HTML::EmbperlObject
Options ExecCGI
< /Location >
HTML::EmbperlObject allows you to build object-oriented (OO) websites using HTML components which implement inheritance via subdirectories. This enables elegant architectures and encourages code reuse. The use of inheritance also enables a website-wide "look and feel" to be specified in a single HTML file, which is then used as a template for every other page on the site. This template can include other modules which can be overridden in subdirectories; even the template itself can be overridden. In a nutshell, EmbperlObject makes the design of large websites much more intuitive, allowing object-oriented concepts to be utilised to the fullest while staying within the "rapid application development" model of Perl and HTML.
HTML::EmbperlObject is basicly a mod_perl handler or could be invoked offline and helps you to build a whole page out of smaller parts. Basicly it does the following:
When a request comes in, a page, which name is specified by EMBPERL_OBJECT_BASE, is searched in the same directory as the requested page. If the pages isnt found, EmbperlObject walking up the directory tree until it finds the page, or it reaches DocumentRoot or the directory specified by EMBPERL_OBJECT_STOPDIR.
This page is then called as frame for building the real page. Addtionaly EmbperlObject sets the search path to contain all directories it had to walk before finding that page. If EMBPERL_OBJECT_STOPDIR is set the path contains all directories up to the in EMBPERL_OBJECT_STOPDIR specified one.
This frame page can now include other pages, using the HTML::Embperl::Execute method. Because the search path is set by EmbperlObject the included files are searched in the directories starting at the directory of the original request walking up thru the directory which contains the base page. This means that you can have common files, like header, footer etc. in the base directory and override them as necessary in the subdirectory.
To include the original requested file, you need to call Execute with a * as filename. To call the the same file, but in an upper directory you can use the special shortcut ../*.
Additionaly EmbperlObject sets up a inherence hierachie for you: The requested page inherit from the base page and the base page inherit from a class which could be specified by EMBPERL_OBJECT_HANDLER_CLASS, or if EMBPERL_OBJECT_HANDLER_CLASS is not set, from HTML::Embperl::Req. That allows you to define methods in base page and overwrite them as neccessary in the original requested files.
For this purpose a request object, which is blessed into the package of the requested page, is given as first parameter to each page (in $_[0]). Because this request object is a hashref, you can also use it to store additional data, which should be available in all components. Embperl does not use this hash itself, so you are free to store whatever you want. Methods can be ordinary Perl subs (defined with [! sub foo { ... } !] ) or Embperl subs (defined with [$sub foo $] .... [$endsub $]) .
Download (0.35MB)
Added: 2006-09-01 License: Perl Artistic License Price:
1148 downloads
Apache2::AuthCookieDBI 2.03
Apache2::AuthCookieDBI is an AuthCookie module backed by a DBI database. more>>
Apache2::AuthCookieDBI is an AuthCookie module backed by a DBI database.
SYNOPSIS
# In httpd.conf or .htaccess
PerlModule Apache2::AuthCookieDBI
PerlSetVar WhatEverPath /
PerlSetVar WhatEverLoginScript /login.pl
# Optional, to share tickets between servers.
PerlSetVar WhatEverDomain .domain.com
# These must be set
PerlSetVar WhatEverDBI_DSN "DBI:mysql:database=test"
PerlSetVar WhatEverDBI_SecretKey "489e5eaad8b3208f9ad8792ef4afca73598ae666b0206a9c92ac877e73ce835c"
# These are optional, the module sets sensible defaults.
PerlSetVar WhatEverDBI_User "nobody"
PerlSetVar WhatEverDBI_Password "password"
PerlSetVar WhatEverDBI_UsersTable "users"
PerlSetVar WhatEverDBI_UserField "user"
PerlSetVar WhatEverDBI_PasswordField "password"
PerlSetVar WhatEverDBI_CryptType "none"
PerlSetVar WhatEverDBI_GroupsTable "groups"
PerlSetVar WhatEverDBI_GroupField "grp"
PerlSetVar WhatEverDBI_GroupUserField "user"
PerlSetVar WhatEverDBI_EncryptionType "none"
PerlSetVar WhatEverDBI_SessionLifetime 00-24-00-00
# Protected by AuthCookieDBI.
< Directory /www/domain.com/authcookiedbi >
AuthType Apache2::AuthCookieDBI
AuthName WhatEver
PerlAuthenHandler Apache2::AuthCookieDBI->authenticate
PerlAuthzHandler Apache2::AuthCookieDBI->authorize
require valid-user
# or you can require users:
require user jacob
# You can optionally require groups.
require group system
< /Directory >
# Login location.
< Files LOGIN >
AuthType Apache2::AuthCookieDBI
AuthName WhatEver
SetHandler perl-script
PerlHandler Apache2::AuthCookieDBI->login
< /Files >
This module is an authentication handler that uses the basic mechanism provided by Apache2::AuthCookie with a DBI database for ticket-based protection. It is based on two tokens being provided, a username and password, which can be any strings (there are no illegal characters for either). The username is used to set the remote user as if Basic Authentication was used.
On an attempt to access a protected location without a valid cookie being provided, the module prints an HTML login form (produced by a CGI or any other handler; this can be a static file if you want to always send people to the same entry page when they log in). This login form has fields for username and password. On submitting it, the username and password are looked up in the DBI database. The supplied password is checked against the password in the database; the password in the database can be plaintext, or a crypt() or md5_hex() checksum of the password. If this succeeds, the user is issued a ticket. This ticket contains the username, an issue time, an expire time, and an MD5 checksum of those and a secret key for the server. It can optionally be encrypted before returning it to the client in the cookie; encryption is only useful for preventing the client from seeing the expire time. If you wish to protect passwords in transport, use an SSL-encrypted connection. The ticket is given in a cookie that the browser stores.
After a login the user is redirected to the location they originally wished to view (or to a fixed page if the login "script" was really a static file).
On this access and any subsequent attempt to access a protected document, the browser returns the ticket to the server. The server unencrypts it if encrypted tickets are enabled, then extracts the username, issue time, expire time and checksum. A new checksum is calculated of the username, issue time, expire time and the secret key again; if it agrees with the checksum that the client supplied, we know that the data has not been tampered with. We next check that the expire time has not passed. If not, the ticket is still good, so we set the username.
Authorization checks then check that any "require valid-user" or "require user jacob" settings are passed. Finally, if a "require group foo" directive was given, the module will look up the username in a groups database and check that the user is a member of one of the groups listed. If all these checks pass, the document requested is displayed.
If a ticket has expired or is otherwise invalid it is cleared in the browser and the login form is shown again.
<<lessSYNOPSIS
# In httpd.conf or .htaccess
PerlModule Apache2::AuthCookieDBI
PerlSetVar WhatEverPath /
PerlSetVar WhatEverLoginScript /login.pl
# Optional, to share tickets between servers.
PerlSetVar WhatEverDomain .domain.com
# These must be set
PerlSetVar WhatEverDBI_DSN "DBI:mysql:database=test"
PerlSetVar WhatEverDBI_SecretKey "489e5eaad8b3208f9ad8792ef4afca73598ae666b0206a9c92ac877e73ce835c"
# These are optional, the module sets sensible defaults.
PerlSetVar WhatEverDBI_User "nobody"
PerlSetVar WhatEverDBI_Password "password"
PerlSetVar WhatEverDBI_UsersTable "users"
PerlSetVar WhatEverDBI_UserField "user"
PerlSetVar WhatEverDBI_PasswordField "password"
PerlSetVar WhatEverDBI_CryptType "none"
PerlSetVar WhatEverDBI_GroupsTable "groups"
PerlSetVar WhatEverDBI_GroupField "grp"
PerlSetVar WhatEverDBI_GroupUserField "user"
PerlSetVar WhatEverDBI_EncryptionType "none"
PerlSetVar WhatEverDBI_SessionLifetime 00-24-00-00
# Protected by AuthCookieDBI.
< Directory /www/domain.com/authcookiedbi >
AuthType Apache2::AuthCookieDBI
AuthName WhatEver
PerlAuthenHandler Apache2::AuthCookieDBI->authenticate
PerlAuthzHandler Apache2::AuthCookieDBI->authorize
require valid-user
# or you can require users:
require user jacob
# You can optionally require groups.
require group system
< /Directory >
# Login location.
< Files LOGIN >
AuthType Apache2::AuthCookieDBI
AuthName WhatEver
SetHandler perl-script
PerlHandler Apache2::AuthCookieDBI->login
< /Files >
This module is an authentication handler that uses the basic mechanism provided by Apache2::AuthCookie with a DBI database for ticket-based protection. It is based on two tokens being provided, a username and password, which can be any strings (there are no illegal characters for either). The username is used to set the remote user as if Basic Authentication was used.
On an attempt to access a protected location without a valid cookie being provided, the module prints an HTML login form (produced by a CGI or any other handler; this can be a static file if you want to always send people to the same entry page when they log in). This login form has fields for username and password. On submitting it, the username and password are looked up in the DBI database. The supplied password is checked against the password in the database; the password in the database can be plaintext, or a crypt() or md5_hex() checksum of the password. If this succeeds, the user is issued a ticket. This ticket contains the username, an issue time, an expire time, and an MD5 checksum of those and a secret key for the server. It can optionally be encrypted before returning it to the client in the cookie; encryption is only useful for preventing the client from seeing the expire time. If you wish to protect passwords in transport, use an SSL-encrypted connection. The ticket is given in a cookie that the browser stores.
After a login the user is redirected to the location they originally wished to view (or to a fixed page if the login "script" was really a static file).
On this access and any subsequent attempt to access a protected document, the browser returns the ticket to the server. The server unencrypts it if encrypted tickets are enabled, then extracts the username, issue time, expire time and checksum. A new checksum is calculated of the username, issue time, expire time and the secret key again; if it agrees with the checksum that the client supplied, we know that the data has not been tampered with. We next check that the expire time has not passed. If not, the ticket is still good, so we set the username.
Authorization checks then check that any "require valid-user" or "require user jacob" settings are passed. Finally, if a "require group foo" directive was given, the module will look up the username in a groups database and check that the user is a member of one of the groups listed. If all these checks pass, the document requested is displayed.
If a ticket has expired or is otherwise invalid it is cleared in the browser and the login form is shown again.
Download (0.022MB)
Added: 2007-03-19 License: Perl Artistic License Price:
949 downloads
mod_example_ipc 1.0
mod_example_ipc module showcases the use in an Apache 2.0 module of the Shared Memory and Mutex routines. more>>
mod_example_ipc is an Apache module that showcases the use in an Apache 2.0 module of the Shared Memory and Mutex routines found in the Apache Portable Runtime. The module itself does nothing useful.
Installation:
There are two ways to install mod_example_ipc in your server: apxs and the build system integration using config.m4. Using apxs is the easiest. It requires perl to run the apxs script, and the same C compiler that you built Apache with. Simply run
$ /path/to/apache2/bin/apxs -c -i mod_example_ipc.c
from the module source directory. This compiles the source as a shared module and installs it under /path/to/apache2/modules.
To integrate the module, copy mod_example_ipc.c and config2.m4 to the modules/experimental directory under your Apache 2.0 source tree. Then run ./buildconf from the top of the source tree. You need to have GNU autoconf and libtool installed to do this. After this step, you can run configure and enable mod_example_ipc:
$ ./configure ... --enable-example_ipc ...
and build Apache as you normally would.
Once you build the module, you can activate it in the Apache configuration as follows:
# You only need this if you built the module as a shared library
LoadModule example_ipc_module modules/mod_example_ipc.so
< Location /example_ipc >
SetHandler example_ipc
< /Location >
Now, any call to http://yourserver/example_ipc will cause the modules handler to grab the lock, increment the shared memory counter and return a small HTML page. Run a benchmark tool with multiple parallel sessions (like ab which comes with Apache) against this URL to see the effect of the IPC.
<<lessInstallation:
There are two ways to install mod_example_ipc in your server: apxs and the build system integration using config.m4. Using apxs is the easiest. It requires perl to run the apxs script, and the same C compiler that you built Apache with. Simply run
$ /path/to/apache2/bin/apxs -c -i mod_example_ipc.c
from the module source directory. This compiles the source as a shared module and installs it under /path/to/apache2/modules.
To integrate the module, copy mod_example_ipc.c and config2.m4 to the modules/experimental directory under your Apache 2.0 source tree. Then run ./buildconf from the top of the source tree. You need to have GNU autoconf and libtool installed to do this. After this step, you can run configure and enable mod_example_ipc:
$ ./configure ... --enable-example_ipc ...
and build Apache as you normally would.
Once you build the module, you can activate it in the Apache configuration as follows:
# You only need this if you built the module as a shared library
LoadModule example_ipc_module modules/mod_example_ipc.so
< Location /example_ipc >
SetHandler example_ipc
< /Location >
Now, any call to http://yourserver/example_ipc will cause the modules handler to grab the lock, increment the shared memory counter and return a small HTML page. Run a benchmark tool with multiple parallel sessions (like ab which comes with Apache) against this URL to see the effect of the IPC.
Download (0.006MB)
Added: 2006-05-18 License: The Apache License 2.0 Price:
1254 downloads
Apache::ePerl 2.2.13
Apache::ePerl is a fast emulated Embedded Perl (ePerl) facility. more>>
Apache::ePerl is a fast emulated Embedded Perl (ePerl) facility.
SYNOPSIS
# Apaches httpd.conf file
# mandatory: activation of Apache::ePerl
PerlModule Apache::ePerl
< Files ~ "/root/of/webmaster/area/.+.iphtml$" >
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::ePerl
< /Files >
# optional: configuration of Apache::ePerl
< Perl >
$Apache::ePerl::Config->{BeginDelimiter} = $Apache::ePerl::Config->{EndDelimiter} = !>;
$Apache::ePerl::Config->{CaseDelimiters} = 0;
$Apache::ePerl::Config->{ConvertEntities} = 1;
< /Perl >
# optional: activation of Apache::Status for Apache::ePerl
< Location /perl-status >
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::Status
< /Location >
This packages provides a handler function for Apache/mod_perl which can be used to emulate the stand-alone Server-Side-Scripting-Language ePerl (see eperl(3) for more details) in a very fast way. This is not a real 100% replacement for nph-eperl because of reduced functionality under some special cases, principal runtime restrictions and speedup decisions. For instance this variant does not (and cannot) provide the SetUID feature of ePerl nor does it check for allowed filename extensions (speedup!), etc. Instead it uses further features like object caching which ePerl does not use.
But the accepted bristled source file format is exactly the same as with the regular ePerl facility, because Apache::ePerl uses the Parse::ePerl package which provides the original ePerl parser and translator. So, any valid ePerl which works under nph-eperl can also be used under Apache::ePerl.
The intent is to use this special variant of ePerl for scripts which are directly under control of the webmaster. In this situation no real security problems exists for him, because all risk is at his own hands. For the average user you should not use Apache::ePerl. Instead additionally install the regular stand-alone ePerl facility (nph-eperl) for those users.
So, the advantage of Apache::ePerl against the regular nph-eperl is better performance and nothing else. Actually scripts executed under Apache::ePerl are at least twice as fast as under nph-eperl. The reason its not that ePerl itself is faster. The reason is the runtime in-core environment of Apache/mod_perl which does not have any forking overhead.
<<lessSYNOPSIS
# Apaches httpd.conf file
# mandatory: activation of Apache::ePerl
PerlModule Apache::ePerl
< Files ~ "/root/of/webmaster/area/.+.iphtml$" >
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::ePerl
< /Files >
# optional: configuration of Apache::ePerl
< Perl >
$Apache::ePerl::Config->{BeginDelimiter} = $Apache::ePerl::Config->{EndDelimiter} = !>;
$Apache::ePerl::Config->{CaseDelimiters} = 0;
$Apache::ePerl::Config->{ConvertEntities} = 1;
< /Perl >
# optional: activation of Apache::Status for Apache::ePerl
< Location /perl-status >
Options +ExecCGI
SetHandler perl-script
PerlHandler Apache::Status
< /Location >
This packages provides a handler function for Apache/mod_perl which can be used to emulate the stand-alone Server-Side-Scripting-Language ePerl (see eperl(3) for more details) in a very fast way. This is not a real 100% replacement for nph-eperl because of reduced functionality under some special cases, principal runtime restrictions and speedup decisions. For instance this variant does not (and cannot) provide the SetUID feature of ePerl nor does it check for allowed filename extensions (speedup!), etc. Instead it uses further features like object caching which ePerl does not use.
But the accepted bristled source file format is exactly the same as with the regular ePerl facility, because Apache::ePerl uses the Parse::ePerl package which provides the original ePerl parser and translator. So, any valid ePerl which works under nph-eperl can also be used under Apache::ePerl.
The intent is to use this special variant of ePerl for scripts which are directly under control of the webmaster. In this situation no real security problems exists for him, because all risk is at his own hands. For the average user you should not use Apache::ePerl. Instead additionally install the regular stand-alone ePerl facility (nph-eperl) for those users.
So, the advantage of Apache::ePerl against the regular nph-eperl is better performance and nothing else. Actually scripts executed under Apache::ePerl are at least twice as fast as under nph-eperl. The reason its not that ePerl itself is faster. The reason is the runtime in-core environment of Apache/mod_perl which does not have any forking overhead.
Download (0.19MB)
Added: 2006-10-11 License: Perl Artistic License Price:
1109 downloads
Apache2::JSONRPC 0.03
Apache2::JSONRPC is a mod_perl handler for JSONRPC. more>>
Apache2::JSONRPC is a mod_perl handler for JSONRPC.
SYNOPSIS
< Location /json-rpc >
SetHandler perl-script
PerlOptions +GlobalRequest
PerlResponseHandler Apache2::JSONRPC->handler
JSONRPC_Class CGI::JSONRPC::Dispatcher
< /Location >
Apache2::JSONRPC is a subclass of CGI::JSONRPC that provides some extra bells and whistles in a mod_perl2 environment.
Currently, the main feature is the "JSONRPC_Class" apache2 config directive, which allows you to define what class to use for invoking JSONRPC methods. The default is the same as CGI::JSONRPC uses, CGI::JSONRPC::Dispatcher.
<<lessSYNOPSIS
< Location /json-rpc >
SetHandler perl-script
PerlOptions +GlobalRequest
PerlResponseHandler Apache2::JSONRPC->handler
JSONRPC_Class CGI::JSONRPC::Dispatcher
< /Location >
Apache2::JSONRPC is a subclass of CGI::JSONRPC that provides some extra bells and whistles in a mod_perl2 environment.
Currently, the main feature is the "JSONRPC_Class" apache2 config directive, which allows you to define what class to use for invoking JSONRPC methods. The default is the same as CGI::JSONRPC uses, CGI::JSONRPC::Dispatcher.
Download (0.012MB)
Added: 2007-03-20 License: Perl Artistic License Price:
948 downloads
Alarm::Concurrent 1.0
Alarm::Concurrent is a Perl module that allows multiple, concurrent alarms. more>>
Alarm::Concurrent is a Perl module that allows multiple, concurrent alarms.
This module is an attempt to enhance Perls built-in alarm/$SIG{ALRM} functionality.
This function, and its associated signal handler, allow you to arrange for your program to receive a SIGALRM signal, which you can then catch and deal with appropriately.
Unfortunately, due to the nature of the design of these signals (at the OS level), you can only have one alarm and handler active at any given time. Thats where this module comes in.
This module allows you to define multiple alarms, each with an associated handler. These alarms are sequenced (in a queue) but concurrent, which means that their order is preserved but they always go off as their set time expires, regardless of the state of the other alarms. (If youd like to have the alarms only go off in the order you set them, see Alarm::Queued.)
To set an alarm, call the setalarm() function with the set time of the alarm and a reference to the subroutine to be called when the alarm goes off. You can then go on with your program and the alarm will be called after the set time has passed.
It is also possible to set an alarm that does not have a handler associated with it using Alarm::Concurrent::alarm(). (This function can also be imported into your namespace, in which case it will replace Perls built-in alarm for your package only.)
If an alarm that does not have a handler associated with it goes off, the default handler, pointed to by $Alarm::Concurrent::DEFAULT_HANLDER, is called. You can change the default handler by assigning to this variable.
The default $Alarm::Concurrent::DEFAULT_HANDLER simply dies with the message "Alarm clock!n".
IMPORT/EXPORT
No methods are exported by default but you can import any of the functions in the FUNCTIONS section.
You can also import the special tag :ALL which will import all the functions in the FUNCTIONS section (except Alarm::Concurrent::restore()).
OVERRIDE
If you import the special tag :OVERRIDE, this module will override Perls built-in alarm function for every namespace and it will take over Perls magic %SIG variable, changing any attempts to read or write $SIG{ALRM} into calls to gethandler() and sethandler(), respectively (reading and writing to other keys in %SIG is unaffected).
This can be useful when you are calling code that tries to set its own alarm "the old fashioned way." It can also, however, be dangerous. Overriding alarm is documented and should be stable but taking over %SIG is more risky (see CAVEATS).
Note that if you do not override alarm and %SIG, any code you use that sets "legacy alarms" will disable all of your concurrent alarms. You can call Alarm::Concurrent::restore() to reinstall the Alarm::Concurrent handler. This function can not be imported.
<<lessThis module is an attempt to enhance Perls built-in alarm/$SIG{ALRM} functionality.
This function, and its associated signal handler, allow you to arrange for your program to receive a SIGALRM signal, which you can then catch and deal with appropriately.
Unfortunately, due to the nature of the design of these signals (at the OS level), you can only have one alarm and handler active at any given time. Thats where this module comes in.
This module allows you to define multiple alarms, each with an associated handler. These alarms are sequenced (in a queue) but concurrent, which means that their order is preserved but they always go off as their set time expires, regardless of the state of the other alarms. (If youd like to have the alarms only go off in the order you set them, see Alarm::Queued.)
To set an alarm, call the setalarm() function with the set time of the alarm and a reference to the subroutine to be called when the alarm goes off. You can then go on with your program and the alarm will be called after the set time has passed.
It is also possible to set an alarm that does not have a handler associated with it using Alarm::Concurrent::alarm(). (This function can also be imported into your namespace, in which case it will replace Perls built-in alarm for your package only.)
If an alarm that does not have a handler associated with it goes off, the default handler, pointed to by $Alarm::Concurrent::DEFAULT_HANLDER, is called. You can change the default handler by assigning to this variable.
The default $Alarm::Concurrent::DEFAULT_HANDLER simply dies with the message "Alarm clock!n".
IMPORT/EXPORT
No methods are exported by default but you can import any of the functions in the FUNCTIONS section.
You can also import the special tag :ALL which will import all the functions in the FUNCTIONS section (except Alarm::Concurrent::restore()).
OVERRIDE
If you import the special tag :OVERRIDE, this module will override Perls built-in alarm function for every namespace and it will take over Perls magic %SIG variable, changing any attempts to read or write $SIG{ALRM} into calls to gethandler() and sethandler(), respectively (reading and writing to other keys in %SIG is unaffected).
This can be useful when you are calling code that tries to set its own alarm "the old fashioned way." It can also, however, be dangerous. Overriding alarm is documented and should be stable but taking over %SIG is more risky (see CAVEATS).
Note that if you do not override alarm and %SIG, any code you use that sets "legacy alarms" will disable all of your concurrent alarms. You can call Alarm::Concurrent::restore() to reinstall the Alarm::Concurrent handler. This function can not be imported.
Download (0.007MB)
Added: 2007-04-30 License: Perl Artistic License Price:
907 downloads
Apache::ProxyConf 1.0
Apache::ProxyConf is a Perl module that can generate proxy configuration for browsers. more>>
Apache::ProxyConf is a Perl module that can generate proxy configuration for browsers.
SYNOPSIS
# In httpd.conf:
< Location / >
SetHandler perl-script
PerlHandler Apache::ProxyConf
PerlSetVar ProxyConfConfig "/some/location/proxyconf.ini"
< /Location >
The Apache::ProxyConf is used to configure the proxy settings in browsers automatically. The modules returns a script that conforms to the Navigator Proxy Auto-Config File Format. The module is suitable for large scale installations that have multiple (cascading) proxies. It can be used to return the closest proxy based on the network topology. Failover and load distribution is also provided.
Browser configuration
The (virtual) webserver must be entered in the Autoconfigure URL of the browser to make use of the ProxyConf script.
http://proxyconf.some.domain/
In IE the URL must be specified in the Address field, just below the Use automatic configuration script tickbox.
THE CONFIGURATION FILE
The ProxyConf module first reads a .ini-style configuration file to determine the proxy settings of the network. The configuration file contains three sections: proxy, noproxy and https.
The proxy section
The sections proxy and https have an identical format. They contain lines of the form subnet=proxyip:port.
Single proxy
[proxy]
172.16.32.0/20=172.16.32.10:3128
The subnet 172.16.32.0/20 has a single proxy defined. The proxy server is 172.16.32.10 and it listens on port 3128.
Multiple proxies
[proxy]
172.16.0.0/20=172.16.0.10:3128,172.16.0.20:3128
Multiple proxy servers are defined in a comma separated list. In this example clients in the 172.16.0.0/20 subnet use 172.16.0.10 as their primary proxy server. When this server becomes unavailable, the clients will move over to 172.16.0.20 for their proxy requests.
Multiple proxies with load distribution
[proxy]
172.16.0.0/20=(172.16.0.10:3128,172.16.0.20:3128)
When proxy servers are placed between brackets, the load is distribution amongst the proxies. Some clients will have the first proxy as primary and some clients will have the second proxy as primary. The other proxy is used as a backup. The order in which the proxies are tried depends on the IP address of the client. The script is deterministic, so for a given IP address the priority list is always the same.
To determine the proxy list for a given IP address multiple rules may be applied. Subnets are tried from the highest to the lowest mask. The module puts all proxies that are found in a list.
The noproxy section
The noproxy section contains hosts that should be contacted by the clients directly. Noticeably, web servers that use NTLM authentication will not work when clients connect to them via a proxy server. The syntax for specifying noproxy hosts is subnet=fqhn1,fqhn2,... Alternatively, the multiline syntax can be used, as shown in this example.
[noproxy]
0.0.0.0/0=<<less
SYNOPSIS
# In httpd.conf:
< Location / >
SetHandler perl-script
PerlHandler Apache::ProxyConf
PerlSetVar ProxyConfConfig "/some/location/proxyconf.ini"
< /Location >
The Apache::ProxyConf is used to configure the proxy settings in browsers automatically. The modules returns a script that conforms to the Navigator Proxy Auto-Config File Format. The module is suitable for large scale installations that have multiple (cascading) proxies. It can be used to return the closest proxy based on the network topology. Failover and load distribution is also provided.
Browser configuration
The (virtual) webserver must be entered in the Autoconfigure URL of the browser to make use of the ProxyConf script.
http://proxyconf.some.domain/
In IE the URL must be specified in the Address field, just below the Use automatic configuration script tickbox.
THE CONFIGURATION FILE
The ProxyConf module first reads a .ini-style configuration file to determine the proxy settings of the network. The configuration file contains three sections: proxy, noproxy and https.
The proxy section
The sections proxy and https have an identical format. They contain lines of the form subnet=proxyip:port.
Single proxy
[proxy]
172.16.32.0/20=172.16.32.10:3128
The subnet 172.16.32.0/20 has a single proxy defined. The proxy server is 172.16.32.10 and it listens on port 3128.
Multiple proxies
[proxy]
172.16.0.0/20=172.16.0.10:3128,172.16.0.20:3128
Multiple proxy servers are defined in a comma separated list. In this example clients in the 172.16.0.0/20 subnet use 172.16.0.10 as their primary proxy server. When this server becomes unavailable, the clients will move over to 172.16.0.20 for their proxy requests.
Multiple proxies with load distribution
[proxy]
172.16.0.0/20=(172.16.0.10:3128,172.16.0.20:3128)
When proxy servers are placed between brackets, the load is distribution amongst the proxies. Some clients will have the first proxy as primary and some clients will have the second proxy as primary. The other proxy is used as a backup. The order in which the proxies are tried depends on the IP address of the client. The script is deterministic, so for a given IP address the priority list is always the same.
To determine the proxy list for a given IP address multiple rules may be applied. Subnets are tried from the highest to the lowest mask. The module puts all proxies that are found in a list.
The noproxy section
The noproxy section contains hosts that should be contacted by the clients directly. Noticeably, web servers that use NTLM authentication will not work when clients connect to them via a proxy server. The syntax for specifying noproxy hosts is subnet=fqhn1,fqhn2,... Alternatively, the multiline syntax can be used, as shown in this example.
[noproxy]
0.0.0.0/0=<<less
Download (0.007MB)
Added: 2007-07-30 License: Perl Artistic License Price:
816 downloads
Apache::App::Gallery::Simple 1.09
Apache::App::Gallery::Simple is an elegant and fast filesystem-based image galleries. more>>
Apache::App::Gallery::Simple is an elegant and fast filesystem-based image galleries.
SYNOPSIS
< Location /photos >
SetHandler perl-script
PerlHandler Apache::App::Gallery::Simple;
PerlSetVar GalleryRoot /vacation/images
PerlSetVar GalleryName "My Vacation Photos"
< /Location >
< Location /~hawkeye/photos >
SetHandler perl-script
PerlHandler Apache::App::Gallery::Simple
PerlSetVar GalleryRoot /images
PerlSetVar GalleryName "Hawkeyes Pictures"
PerlSetVar ThumbWidth 250
< /Location >
Gallery::Simple creates navigable thumbnail galleries from directories with images on your web server. Gallery::Simple is completely configurable via a simple template system, allows for image captions as well as multimedia support, and also allows you to specify multiple languages for your templates and captions. The rest of this document is just the details.
Gallery::Simple creates an image gallery (complete with thumbnails and navigation links) from a directory or directory hierarchy on a web server. Simply upload images to a directory and the work is done. You can add captions to your images or other media (e.g., movies; see "ALTERNATIVE MEDIA") and the entire Gallery::Simple application is customizable using a simple template system (see "TEMPLATES").
I wanted an image gallery that was as easy to setup and use as Apache::Album but that offered a little more flexibility with captions, style/layout (including CSS or other customizations).
Some effort has been made to retain some of the Apache::Album configuration directives, if not in name, at least in spirit. You should also be able to use existing thumbnail directories if youre migrating from Apache::Album.
Using Gallery::Simple is, well, simple. There are no configuration files or anything of that sort (other than the Apache directives described in "OPTIONS"). All you have to do is install it, add something like the Location block shown above in "SYNOPSIS" section, and the path specified in GalleryRoot has suddenly become an image gallery.
There are a few features that are not implemented that Apache::Album does implement, namely:
- slideshow
- browser-based uploads and gallery configuration
- image sorting
- variable image size viewing
Gallery::Simple does do a couple of things well, however. It allows you to put captions to your images. It allows you to link to an alternative media source in the image page, which means you can also upload movies and other such stuff into your gallery. It allows template sets and caption files for multiple languages, meaning web visitors who prefer to see your site in Spanish may do so, while the German readers can see German galleries.
Gallery::Simple handles virtual hosted domains and even handles "tilde-dirs" or directories using Apaches UserDir directive in the form of http://www.foo.dom/~bar/baz.
Further, Gallery::Simple also allows you to completely customize the HTML returned for a particular gallery and an image page (you could even customize it to return XML if you wanted). You can add style sheets, alter (even replace) the layout so that it integrates cleanly with your existing web site.
<<lessSYNOPSIS
< Location /photos >
SetHandler perl-script
PerlHandler Apache::App::Gallery::Simple;
PerlSetVar GalleryRoot /vacation/images
PerlSetVar GalleryName "My Vacation Photos"
< /Location >
< Location /~hawkeye/photos >
SetHandler perl-script
PerlHandler Apache::App::Gallery::Simple
PerlSetVar GalleryRoot /images
PerlSetVar GalleryName "Hawkeyes Pictures"
PerlSetVar ThumbWidth 250
< /Location >
Gallery::Simple creates navigable thumbnail galleries from directories with images on your web server. Gallery::Simple is completely configurable via a simple template system, allows for image captions as well as multimedia support, and also allows you to specify multiple languages for your templates and captions. The rest of this document is just the details.
Gallery::Simple creates an image gallery (complete with thumbnails and navigation links) from a directory or directory hierarchy on a web server. Simply upload images to a directory and the work is done. You can add captions to your images or other media (e.g., movies; see "ALTERNATIVE MEDIA") and the entire Gallery::Simple application is customizable using a simple template system (see "TEMPLATES").
I wanted an image gallery that was as easy to setup and use as Apache::Album but that offered a little more flexibility with captions, style/layout (including CSS or other customizations).
Some effort has been made to retain some of the Apache::Album configuration directives, if not in name, at least in spirit. You should also be able to use existing thumbnail directories if youre migrating from Apache::Album.
Using Gallery::Simple is, well, simple. There are no configuration files or anything of that sort (other than the Apache directives described in "OPTIONS"). All you have to do is install it, add something like the Location block shown above in "SYNOPSIS" section, and the path specified in GalleryRoot has suddenly become an image gallery.
There are a few features that are not implemented that Apache::Album does implement, namely:
- slideshow
- browser-based uploads and gallery configuration
- image sorting
- variable image size viewing
Gallery::Simple does do a couple of things well, however. It allows you to put captions to your images. It allows you to link to an alternative media source in the image page, which means you can also upload movies and other such stuff into your gallery. It allows template sets and caption files for multiple languages, meaning web visitors who prefer to see your site in Spanish may do so, while the German readers can see German galleries.
Gallery::Simple handles virtual hosted domains and even handles "tilde-dirs" or directories using Apaches UserDir directive in the form of http://www.foo.dom/~bar/baz.
Further, Gallery::Simple also allows you to completely customize the HTML returned for a particular gallery and an image page (you could even customize it to return XML if you wanted). You can add style sheets, alter (even replace) the layout so that it integrates cleanly with your existing web site.
Download (0.024MB)
Added: 2006-11-17 License: Perl Artistic License Price:
1072 downloads
Apache::MP3::Sorted 4.00
Apache::MP3::Sorted is a Perl module to generate sorted streamable directories of MP3 files. more>>
Apache::MP3::Sorted is a Perl module to generate sorted streamable directories of MP3 files.
SYNOPSIS
# httpd.conf or srm.conf
AddType audio/mpeg mp3 MP3
# httpd.conf or access.conf
< Location /songs >
SetHandler perl-script
PerlHandler Apache::MP3::Sorted
PerlSetVar SortFields Album,Title,-Duration
PerlSetVar Fields Title,Artist,Album,Duration
< /Location >
Apache::MP3::Sorted subclasses Apache::MP3 to allow for sorting of MP3 listings by various criteria. See Apache::MP3 for details on installing and using.
<<lessSYNOPSIS
# httpd.conf or srm.conf
AddType audio/mpeg mp3 MP3
# httpd.conf or access.conf
< Location /songs >
SetHandler perl-script
PerlHandler Apache::MP3::Sorted
PerlSetVar SortFields Album,Title,-Duration
PerlSetVar Fields Title,Artist,Album,Duration
< /Location >
Apache::MP3::Sorted subclasses Apache::MP3 to allow for sorting of MP3 listings by various criteria. See Apache::MP3 for details on installing and using.
Download (0.32MB)
Added: 2006-11-07 License: Perl Artistic License Price:
1082 downloads
Apache::ReverseProxy 0.07
Apache::ReverseProxy is an Apache mod_perl reverse proxy. more>>
Apache::ReverseProxy is an Apache mod_perl reverse proxy.
SYNOPSIS
# In Apache config file
< Location / >
SetHandler perl-script
PerlHandler Apache::ReverseProxy
PerlSetVar ReverseProxyConfig /usr/local/apache/conf/rproxy.conf
< /Location >
# In rproxy.conf / http://www.cpan.org/
This is a reverse proxy module for Apache with mod_perl. It is intended to replace Apache::ProxyPass. Given a list of URI mappings, this module will translate an incoming URI, retrieve the contents for the translated URI, and return the contents to the original requestor. This module allows you to specify exact matching (instead of regular expression matching) and handles query string translations.
CONFIGURATION
You will need to set the ReverseProxyConfig perl variable in Apache to the path of the reverse proxy mapping file. For example:
< Location / >
SetHandler perl-script
PerlHandler Apache::ReverseProxy
PerlSetVar ReverseProxyConfig /usr/local/apache/conf/rproxy.conf
# Optional configuration items:
#PerlSetVar ReverseProxyChain http://proxy.mycompany.com:8888/
#PerlSetVar ReverseProxyNoChain mycompany.com
< /Location >
ReverseProxyChain specifies a proxy server to use. This is sometimes called proxy chaining when one proxy server uses another proxy server. The ReverseProxyNoChain directive can specify a domain to not use proxy chaining on.
Reverse proxy configuration files have three fields, each separated by white space. The first field is the uri to look for, the second field is the replacement uri, and the third field is optional and allows you to specify comma separated options for the mapping. The only option that is currently supported is the exact parameter, which will make the reverse proxy use exact matching for the first parameter instead of using regular expressions. This feature is convenient when the first parameter contains characters that may need to be escaped or quotemetaed. Exact options are evaluated first. If there isnt an exact match, regular expression matches are performed. Configuration files may contain comments, which start with a pound sign. For example:
/news/ http://www.news.com/
/ http://www.perl.com/
/stats http://localhost/stats exact
# /stats maps exactly to http://localhost/stats
# /stats/b maps to http://www.perl.com/stats/b
/french/news http://www.news.com/?language=french
# /french/news/index -> http://www.news.com/index?language=french
# /french/news/index?a=b -> http://www.news.com/index?language=french&a=b
<<lessSYNOPSIS
# In Apache config file
< Location / >
SetHandler perl-script
PerlHandler Apache::ReverseProxy
PerlSetVar ReverseProxyConfig /usr/local/apache/conf/rproxy.conf
< /Location >
# In rproxy.conf / http://www.cpan.org/
This is a reverse proxy module for Apache with mod_perl. It is intended to replace Apache::ProxyPass. Given a list of URI mappings, this module will translate an incoming URI, retrieve the contents for the translated URI, and return the contents to the original requestor. This module allows you to specify exact matching (instead of regular expression matching) and handles query string translations.
CONFIGURATION
You will need to set the ReverseProxyConfig perl variable in Apache to the path of the reverse proxy mapping file. For example:
< Location / >
SetHandler perl-script
PerlHandler Apache::ReverseProxy
PerlSetVar ReverseProxyConfig /usr/local/apache/conf/rproxy.conf
# Optional configuration items:
#PerlSetVar ReverseProxyChain http://proxy.mycompany.com:8888/
#PerlSetVar ReverseProxyNoChain mycompany.com
< /Location >
ReverseProxyChain specifies a proxy server to use. This is sometimes called proxy chaining when one proxy server uses another proxy server. The ReverseProxyNoChain directive can specify a domain to not use proxy chaining on.
Reverse proxy configuration files have three fields, each separated by white space. The first field is the uri to look for, the second field is the replacement uri, and the third field is optional and allows you to specify comma separated options for the mapping. The only option that is currently supported is the exact parameter, which will make the reverse proxy use exact matching for the first parameter instead of using regular expressions. This feature is convenient when the first parameter contains characters that may need to be escaped or quotemetaed. Exact options are evaluated first. If there isnt an exact match, regular expression matches are performed. Configuration files may contain comments, which start with a pound sign. For example:
/news/ http://www.news.com/
/ http://www.perl.com/
/stats http://localhost/stats exact
# /stats maps exactly to http://localhost/stats
# /stats/b maps to http://www.perl.com/stats/b
/french/news http://www.news.com/?language=french
# /french/news/index -> http://www.news.com/index?language=french
# /french/news/index?a=b -> http://www.news.com/index?language=french&a=b
Download (0.006MB)
Added: 2007-07-30 License: Perl Artistic License Price:
816 downloads
Apache2::Autocomplete 0.1
Apache2::Autocomplete is a Perl module to autocomplete service backend via mod_perl. more>>
Apache2::Autocomplete is a Perl module to autocomplete service backend via mod_perl.
SYNOPSIS
Given some form that using Googles autocomplete that receives suggestions from http://localhost/complete/search:
######################################################
# in httpd.conf
PerlModule Apache2::MyAutoComplete
< Location /complete/search >
SetHandler perl-script
PerlResponseHandler Apache2::MyAutoComplete
< /Location >
######################################################
######################################################
# module file Apache2/MyAutoComplete.pm
package Apache2::MyAutoComplete;
use base qw(Apache2::Autocomplete);
# use whatever else
my @NAMES = qw(bob carol ted alice);
sub expand {
my ($self, $query) = @_;
my $re = qr/^Q$queryE/i;
my @names = grep /$re/, @NAMES;
my @values = map {"some description"} @names;
(lc $query, @names, @values, [""]);
}
sub handler {
my $r = shift;
my $ac = __PACKAGE__->new($r);
$ac->run();
return Apache2::Const::OK;
}
######################################################
This module is a mod_perl2 interface to JavaScript::Autocomplete::Backend, which is a base class for implementing an autocomplete service for a form using the Google Suggest protocol. See http://www.google.com/webhp?complete=1&hl=en for an illustration of Google Suggest in operation, as well as http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html for a description of how the JavaScript code works.
As well as mod_perl2, this package requires JavaScript::Autocomplete::Backend, as well as a CGI.pm-compatible CGI module for supplying the param() and header() methods. If available, CGI::Apache2::Wrapper will be used, which is a minimal module that uses methods of mod_perl2 and Apache2::Request to provide these methods; if this is not available, CGI (version 2.93 or greater) will be used.
Operation of this service requires inclusion of the Autocomplete JavaScript code; a copy of this is included in this distribution, the latest version of which is available at http://www.google.com/ac.js.
<<lessSYNOPSIS
Given some form that using Googles autocomplete that receives suggestions from http://localhost/complete/search:
######################################################
# in httpd.conf
PerlModule Apache2::MyAutoComplete
< Location /complete/search >
SetHandler perl-script
PerlResponseHandler Apache2::MyAutoComplete
< /Location >
######################################################
######################################################
# module file Apache2/MyAutoComplete.pm
package Apache2::MyAutoComplete;
use base qw(Apache2::Autocomplete);
# use whatever else
my @NAMES = qw(bob carol ted alice);
sub expand {
my ($self, $query) = @_;
my $re = qr/^Q$queryE/i;
my @names = grep /$re/, @NAMES;
my @values = map {"some description"} @names;
(lc $query, @names, @values, [""]);
}
sub handler {
my $r = shift;
my $ac = __PACKAGE__->new($r);
$ac->run();
return Apache2::Const::OK;
}
######################################################
This module is a mod_perl2 interface to JavaScript::Autocomplete::Backend, which is a base class for implementing an autocomplete service for a form using the Google Suggest protocol. See http://www.google.com/webhp?complete=1&hl=en for an illustration of Google Suggest in operation, as well as http://serversideguy.blogspot.com/2004/12/google-suggest-dissected.html for a description of how the JavaScript code works.
As well as mod_perl2, this package requires JavaScript::Autocomplete::Backend, as well as a CGI.pm-compatible CGI module for supplying the param() and header() methods. If available, CGI::Apache2::Wrapper will be used, which is a minimal module that uses methods of mod_perl2 and Apache2::Request to provide these methods; if this is not available, CGI (version 2.93 or greater) will be used.
Operation of this service requires inclusion of the Autocomplete JavaScript code; a copy of this is included in this distribution, the latest version of which is available at http://www.google.com/ac.js.
Download (0.011MB)
Added: 2007-03-19 License: Perl Artistic License Price:
950 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above sethandler search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed