Last Tuesday, during a SFPUG Catalyst talk, I announced App::ForExample <br><br>     <a href="http://search.cpan.org/perldoc?App::ForExample" target="_blank">http://search.cpan.org/perldoc?App::ForExample</a><br>     <a href="http://search.cpan.org/dist/App-ForExample" target="_blank">http://search.cpan.org/dist/App-ForExample</a><br>




<br>This is the tool I&#39;ve written to help with the deployment stage of publishing a Catalyst application. It will<br>generate configurations for Apache, lighttpd, nginx:<br><br><div style="margin-left: 40px;">App::ForExample is a command-line tool for generating sample configurations. It is not designed to do configuration<br>




management, but rather as a guide to get you 80% of the way there<br><br></div><div style="margin-left: 40px;">Besides the usual Apache, lighttpd, nginx, and FastCGI configurations,<br>App::ForExample can create a FastCGI start-stop script and a monit<br>




configuration for monitoring those processes<br></div><br>Here is some typical usage:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   # To output a FastCGI (ExternalServer)/Apache configuration (with monit stub and start-stop script), run:</span><br style="font-family: courier new,monospace;">




<span style="font-family: courier new,monospace;">   for-example catalyst/fastcgi apache2 standalone --package My::App --hostname <a href="http://example.com/" target="_blank">example.com</a> --output my-app</span><br style="font-family: courier new,monospace;">




<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   # The above command would have created the following:</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">




<span style="font-family: courier new,monospace;">       my-app.apache2      The Apache2 virtual host configuration (hosted at (www.)<a href="http://example.com/" target="_blank">example.com</a>)</span><br style="font-family: courier new,monospace;">




<span style="font-family: courier new,monospace;">       my-app.start-stop   The start/stop script to launch the FastCGI process</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">       my-app.monit        A monit stub used for monitoring the FastCGI process</span><br style="font-family: courier new,monospace;">




<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   # This will generate a basic, stripped-down monit configuration (monitrc) suitable for a non-root user:</span><br style="font-family: courier new,monospace;">




<span style="font-family: courier new,monospace;">   for-example monit --home $HOME/monit --output $HOME/monit/monitrc</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">




<span style="font-family: courier new,monospace;">   # A mod_perl configuration for Catalyst:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">   for-example catalyst/mod_perl --package Project::Xyzzy --hostname <a href="http://xyzzy.com/" target="_blank">xyzzy.com</a> --home Project-Xyzzy</span><br>




<br>A tutorial for Apache2 with FastCGI on Ubuntu:<br><br><a href="http://search.cpan.org/perldoc?App::ForExample#Apache2_with_FastCGI_on_Ubuntu" target="_blank">http://search.cpan.org/perldoc?App::ForExample#Apache2_with_FastCGI_on_Ubuntu</a><br>


<br>You can install App::ForExample by using CPAN:<br><br>        cpan -i App::ForExample<br><br>If that doesn&#39;t work properly, you can find help at:<br><br>        <a href="http://sial.org/howto/perl/life-with-cpan/" target="_blank">http://sial.org/howto/perl/life-with-cpan/</a><br>




        <a href="http://sial.org/howto/perl/life-with-cpan/macosx/" target="_blank">http://sial.org/howto/perl/life-with-cpan/macosx/</a> # Help on Mac OS X<br>        <a href="http://sial.org/howto/perl/life-with-cpan/non-root/" target="_blank">http://sial.org/howto/perl/life-with-cpan/non-root/</a> # Help with a non-root account<br>




<br>The source repository is:<br><br>        <a href="http://github.com/robertkrimen/App-ForExample/tree/master" target="_blank">http://github.com/robertkrimen/App-ForExample/tree/master</a><br>

<br>Rob