Apache::MsqlProxy - Translate URI's into mSQL database queries
#httpd.conf or srm.conf PerlTransHandler Apache::MsqlProxy::translate PerlHandler Apache::MsqlProxy::handler PerlModule Apache::MsqlProxy
Configure your browser's HTTP proxy to point at the host running Apache configured with this module:
http://hostname.domain/
When connecting to the server via normal HTTP (not proxy), URLs are not translated.
URL's are translated as follows:
http://hostname/database_name/table_name
Connect to hostname via TCP, select database database_name, query table <table_name> with:
SELECT * from table_name http://hostname/database_name/table_name?login_name=dougm
Same as above with query:
SELECT login_name from table where login_name=dougm http://hostname/database_name/table_name/*?login_name=dougm
SELECT * from table where login_name=dougm
Of course,
http:///database_name/table_name
A null hostname connects via UNIX socket
http://hostname:9876/database_name/table_name
Connect via TCP to hostname and port 9876
This module is meant as an example to show how one can use Apache + mod_perl to handle HTTP proxy requests, or simply translating a URL.
It may not be very useful other than as an example, but feel free to change that.
Apache(3), Msql(3)
Doug MacEachern <dougm@osf.org>
To install Apache, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache
CPAN shell
perl -MCPAN -e shell install Apache
For more information on module installation, please visit the detailed CPAN module installation guide.