canmove, Confirmed users
2,850
edits
Zachlipton (talk | contribs) |
ChrisCooper (talk | contribs) No edit summary |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
'''[[Litmus|« back to Litmus main page]]''' | |||
== Introduction == | == Introduction == | ||
As of August 2006, Litmus uses mod_perl to improve performance. Typically, normal CGI scripts must be compiled by the perl interpreter for each http request. Furthermore, every request requires that perl load and compile all the perl modules Litmus uses, connect to the database, go through the Template Toolkit's initialization routines, and all sorts of other activities before Litmus even gets started processing a particular request. mod_perl performs this initialization step only once--at web server startup time--and runs the script within the context of an already running perl interpretor. | As of August 2006, Litmus uses mod_perl to improve performance. Typically, normal CGI scripts must be compiled by the perl interpreter for each http request. Furthermore, every request requires that perl load and compile all the perl modules Litmus uses, connect to the database, go through the Template Toolkit's initialization routines, and all sorts of other activities before Litmus even gets started processing a particular request. mod_perl performs this initialization step only once--at web server startup time--and runs the script within the context of an already running perl interpretor. | ||
Line 7: | Line 9: | ||
See also the [http://perl.apache.org/docs/1.0/guide/porting.html mod_perl porting guidelines] for further details. | See also the [http://perl.apache.org/docs/1.0/guide/porting.html mod_perl porting guidelines] for further details. | ||
== Apache Configuration on Rodan == | |||
Use this configuration as a model for your own server config | |||
<pre> | |||
<VirtualHost *:80> | |||
ServerName litmus.mozilla.org | |||
DocumentRoot /opt/webtools/testrunner/litmus | |||
<Directory /opt/webtools/testrunner/litmus> | |||
PerlModule Apache::DBI | |||
<Perl> | |||
use CGI; | |||
CGI->compile(qw(header param cookie)); | |||
use DBI; | |||
DBI->install_driver("mysql"); | |||
use Template; | |||
use HTML::StripScripts; | |||
use Text::Markdown; | |||
</Perl> | |||
AddHandler perl-script .cgi .pl | |||
PerlHandler Apache::Registry | |||
Options Indexes FollowSymLinks ExecCGI | |||
DirectoryIndex index.html index.cgi | |||
AllowOverride All | |||
</Directory> | |||
</VirtualHost> | |||
</pre> | |||
== Web Server Restarting / Module Persistence == | == Web Server Restarting / Module Persistence == | ||
Under mod_perl, modules are not reloaded on each http request. This means that if you update Litmus or modify a .pm file within the Litmus tree, those changes will not be picked up until the web server is restarted. | Under mod_perl, modules are not reloaded on each http request. This means that if you update Litmus or modify a .pm file within the Litmus tree, those changes will not be picked up until the web server is restarted. | ||
Litmus developers may prefer to use a 'touch file | Litmus developers may prefer to use a 'touch file' in their local development environments--a special file that, when touched, causes the web server to reload modules. The use of a touch file is documented in the mod_perl documentation. Otherwise, a simple 'apachectl restart' as root will suffice. | ||
On rodan, members of group 'litmus' may trigger a web server restart with the command 'litmus-restart'. Use with extreme caution and fix any errors immediately. Note that the 'updatelitmus' command will not restart the web server for you; you must run 'litmus-restart' as well if you want | On rodan, members of group 'litmus' may trigger a web server restart with the command 'litmus-restart'. Use with extreme caution and fix any errors immediately. Note that the 'updatelitmus' command will not restart the web server for you; you must run 'litmus-restart' as well if you want this to happen. | ||
== Global Variables == | == Global Variables == |