<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV style="FONT: 10pt arial">----- Original Message ----- 
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A 
title=london.pm@unitedgames.co.uk 
href="mailto:london.pm@unitedgames.co.uk">Andrew</A> </DIV>
<DIV><B>To:</B> <A title=london.pm@groups.perlists.pm 
href="mailto:london.pm@groups.perlists.pm">london.pm@groups.perlists.pm</A> 
</DIV>
<DIV><B>Sent:</B> Sunday, October 18, 2015 3:50 PM</DIV>
<DIV><B>Subject:</B> Re: Fw: mod_fastcgi config for a Catalyst app.</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Amazingly it worked on my first attempt!</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>=D</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>WHAT I DID:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Here's what I did:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Placed the following in the includes file, which is called 
from between the virtual hosts tags, in my httpd.conf:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>LoadModule fastcgi_module 
modules/mod_fastcgi.so<BR>&lt;IfModule 
mod_fastcgi.c&gt;<BR>FastCgiExternalServer 
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.pl -host 
<A href="http://www.game-extra.com:55900">www.game-extra.com:55900</A><BR>Alias 

/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.pl/<BR>&lt;/IfModule&gt;</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Then at the command line, I ran:</FONT></DIV>
<DIV><FONT size=2>script/gxcatalysttest_fastcgi.pl -l <A 
href="http://www.game-extra.com:55900">www.game-extra.com:55900</A> -p 
/tmp/myapp.pid</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>..and it worked!</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>SOME NOTES:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>At first, I had the Alias line as:</FONT></DIV>
<DIV><FONT size=2>Alias /myapp/ 
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.pl/</FONT></DIV>
<DIV><FONT size=2>...and what that did was give the impression nothing had 
worked, since <A href="http://www.game-extra.com">www.game-extra.com</A> didn't 
show the catalyst app running.</FONT></DIV>
<DIV><FONT size=2>However, <A 
href="http://www.game-extra.com/myapp/">www.game-extra.com/myapp/</A> did show 
the catalyst app running. So whatever you put at the start of that alias is 
pretty much the path in the URL you want your catalyst app to run at, =), which 
was cool to learn.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I still don't know if </FONT></DIV>
<DIV><FONT size=2>FastCgiExternalServer 
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.pl</FONT></DIV>
<DIV><FONT size=2>...is just a fictional filename that could be anything, or 
always has to literally point to your fastcgi script in the catalyst app's 
script folder.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>And I still don't know why:</FONT></DIV>
<DIV><FONT size=2>-host </FONT><A href="http://www.game-extra.com:55900"><FONT 
size=2>www.game-extra.com:55900</FONT></A></DIV>
<DIV><FONT size=2>....has 55900 at the end. I guess that's the port to talk on. 
Can it be any number, or is there some significance to it being 
55900...?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Finally, how come the tutorial at:</FONT></DIV>
<DIV><FONT size=2><A 
href="http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi#Configure_Apache">http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi#Configure_Apache</A></FONT></DIV>
<DIV><FONT size=2>...says you should use socket for less overhead if the app is 
actually on the apache server.</FONT></DIV>
<DIV><FONT size=2>Yet:</FONT></DIV>
<DIV><FONT size=2><A 
href="http://www.catalystframework.org/calendar/2006/16">http://www.catalystframework.org/calendar/2006/16</A></FONT></DIV>
<DIV><FONT size=2>...advises we use a TCP connection instead.</FONT></DIV>
<DIV><FONT size=2>I'm guessing the Calendar article advises us to have more 
flexibility, whereas the wiki article advises us to use less overhead, and that 
whether you want flexibility or less overhead, should determine which approach 
you choose.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>STILL NEED TO LEARN:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Next thing I need to learn:</FONT></DIV>
<DIV><FONT size=2>If I've used:</FONT></DIV>
<DIV><FONT size=2>script/gxcatalysttest_fastcgi.pl -l <A 
href="http://www.game-extra.com:55900">www.game-extra.com:55900</A> -p 
/tmp/myapp.pid</FONT></DIV>
<DIV><FONT size=2>...to start the app.</FONT></DIV>
<DIV><FONT size=2>How does one stop or restart it?</FONT></DIV>
<DIV><FONT size=2>I shall have a google.</FONT></DIV>
<DIV><FONT size=2>Any tips appreciated!</FONT></DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT 
size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT 
size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT 
size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT 
size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT 
size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><BR></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>================</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>WHAT I DID / LEARNT:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>What have I learnt?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>You put your apache configuration between the virtualhosts 
tags.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>You can either do that directly within the httpd.conf file, 
after which you will have to run:</FONT></DIV>
<DIV><FONT size=2>/usr/local/cpanel/bin/apache_conf_distiller 
--update</FONT></DIV>
<DIV><FONT size=2>...to have your changes retained &nbsp;(otherwise CPanel will 
revert it to whatever it wants - but this is all explained in the text at the 
top of httpd.conf anyway).</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Or you can use separate includes files.</FONT></DIV>
<DIV><FONT size=2>For example, at the end of the virtualhosts tags was the 
following:</FONT></DIV>
<DIV><FONT size=2># To customize this VirtualHost use an include file at the 
following location</FONT></DIV>
<DIV><FONT size=2># Include 
"usr/local/apache/conf/userdata/std/2_2/gamextra/game-extra.com/*.conf"</FONT></DIV>
<DIV><FONT size=2>...so I&nbsp;removed&nbsp;the "#" from the second line, so it 
was no longer commented out, i.e.:</FONT></DIV>
<DIV><FONT size=2>Include 
"usr/local/apache/conf/userdata/std/2_2/gamextra/game-extra.com/*.conf"</FONT></DIV>
<DIV><FONT size=2>I then saved the httpd.conf file.</FONT></DIV>
<DIV><FONT size=2>Then I went to the command line and entered:</FONT></DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>/usr/local/cpanel/bin/apache_conf_distiller 
--update</FONT></DIV>
<DIV>....to retain the changes I just made.</DIV>
<DIV>Then I browsed to usr/local/apache/conf/userdata/std/2_2/</DIV>
<DIV>and created the folder gamextra</DIV>
<DIV>and then the folder game-extra.com</DIV>
<DIV>and then I made a file called try.conf</DIV>
<DIV>&nbsp;</DIV>
<DIV>Inside try.conf, I put the following:</DIV>
<DIV>&nbsp;</DIV>
<DIV>LoadModule fastcgi_module modules/mod_fastcgi.so</DIV>
<DIV>&lt;IfModule mod_fastcgi.c&gt;<BR>FastCgiExternalServer 
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.pl -host 
<A href="http://www.game-extra.com:55900">www.game-extra.com:55900</A><BR>Alias 

/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.pl/<BR>&lt;/IfModule&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then I saved it.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then I went to WHM (WebHostManager) and navigated to the restart services 
section,</DIV>
<DIV>and restarted http (apache), clicking the big blue YES button, =).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then I went back to the command line, logged in as gamextra,</DIV>
<DIV>kept changing directory until I was in&nbsp;my catalyst application's 
folder</DIV>
<DIV>and entered the command line:</DIV>
<DIV>
<DIV><FONT size=2>script/gxcatalysttest_fastcgi.pl -l <A 
href="http://www.game-extra.com:55900">www.game-extra.com:55900</A> -p 
/tmp/myapp.pid</FONT></DIV></DIV></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Hang on.</FONT></DIV>
<DIV><FONT size=2>That's what I did.</FONT></DIV>
<DIV><FONT size=2>Not what I learnt. ^_^.</FONT></DIV>
<DIV><FONT size=2></FONT><FONT size=2>Oh nevermind.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;</DIV></FONT></BODY></HTML>