<HTML> <HEAD> <TITLE>Using Safari with Apache</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <H1 ALIGN="CENTER">Using Safari with Apache</H1> <P ALIGN="CENTER"><I>Note: this is very preliminary. More to come</I></P> <A NAME="Introduction"></A><H2>1.0 Introduction</H2> <P>Safari is a cgi-bin script and may be run under a wide variety of web servers. It is, however, being developed under Apache, mod_perl, and Linux 2.2.9. This all-too-scanty page describes the particulars of using it in that environment. <A NAME="Apache_Config"></A><H2>Apache Configuration</H2> <P>If your Apache is built with mod_perl and mod_rewrite (recommended), then the following entries in your httpd.conf (or equivalent) file might be close to what you need: <PRE> Alias /mod-perl/ "/your/httpd/dir/mod-perl/" <Location /mod-perl> #AllowOverride None SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI Order allow,deny allow from all PerlSendHeader On </Location> # Rewrite rules to call safari by adding the 'project name' to the # query string. The need for this will be removed at some point # by having cgimake figure out project name from PATH_INFO instead # of the QUERY_STRING. RewriteEngine on # Take all URLs of the form /safari/project/... and rewrite them # to call cgimake, putting the project name in to QUERY_STRING RewriteRule ^/safari/([^/]*)/(.*) /mod-perl/cgimake/$2?project=$1 [PT,QSA] #RewriteLog /home/barries/src/safari/test/httpd/logs/rewrite_log #RewriteLogLevel 9 </PRE> <P>As the comment notes, we plan on removing the need for mod_rewrite for this to function. mod_rewrite's cool and all, but it shouldn't be required, since it's not available on a lot of servers, and isn't is powerful on any other web server I'm aware of. </BODY> </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 178 | Barrie Slaymaker |
Modified cgimake to get the project name out of the target name if one isn't supplied. This makes it so that Apache's mod_rewrite is no longer needed to extract the project name from the URL and place it in the QUERY_STRING, and so that you can call cgimake from the command line and place the project name in the target path: cgimake /perl/_head/Default/depot/ Modified cgimake to work easily from the command line Fixed some minor bugs in assembling paths that were causing // to appear in paths when no project is specified. Fixed minor bug that cause cgimake to try to read a bogus config file when there is no $project Tweaked p4_get to provide a more reasonable level of verbosity. Updated the apache doc to reflect the simpler, non-rewrite technique. Added targets to fetch a new _head revision if the head change number has changed. Need to check in p4_update. |
||
#3 | 168 | Barrie Slaymaker | Added YAPC paper, slides | ||
#2 | 165 | Barrie Slaymaker | Applied Greg KH's license patch. | ||
#1 | 162 | Barrie Slaymaker | First code & documentation checkin |