No subject


Sun Aug 23 17:58:40 GMT 2015


Server) is the best mode to run the app under.
This brings us nicely to....

PROBLEM TWO:
http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi#Configur=
e_Apache
...gets pretty confusing here.
It gives the example of:
<IfModule mod_fastcgi.c>
  FastCgiExternalServer /tmp/myapp.fcgi -host myhost:8081
  Alias /myapp/    /tmp/myapp.fcgi/
</IfModule>
I need to know how to customise this for my purposes.
My server does have a /tmp/ directory, and I understand myapp.fcgi is =
totally fictional and shouldn't exist.
Now - what about the rest of the first line? -host myhost:8081
Documentation says we should change hostname and port as appropriate.
What throws me is that the next bullet point says that if the catalyst =
app is actually on our apache server, that we should use "-socket =
<filename>" instead of "-port <n>" .... this is odd, because in the =
example, there is no "-port <n>" used anywhere. It then goes on to say =
using "-host" will still work... then says we should use "localhost" as =
the hostname... before then saying we could use "user -port" instead, =
O_o.
So should the line be:
  FastCgiExternalServer /tmp/myapp.fcgi -host www.mydomainname.com:8081
...or:
  FastCgiExternalServer /tmp/myapp.fcgi -host localhost:8081
...or:
  FastCgiExternalServer /tmp/myapp.fcgi -socket =
some-sort-of-filename-goes-here
(...which raises the question - what filename? mod_fastcgi documentation =
says the filename of the unix domain socket the app uses to communicate =
with the web server - I have no idea what that is, =3DS. )
...or:
  FastCgiExternalServer /tmp/myapp.fcgi gamextra -8081
(..my attempt at interpreting user -port)
...or should the line be something else entirely??=20
I'm assuming:
  Alias /myapp/    /tmp/myapp.fcgi/
...will be entirely correct as it is, yes?

PROBLEM THREE:
Where do I put...
<IfModule mod_fastcgi.c>
  FastCgiExternalServer /tmp/myapp.fcgi -host localhost:8081
  Alias /myapp/    /tmp/myapp.fcgi/
</IfModule>
....? The same place we put the LoadModule line in PROBLEM ONE...?

I assume after solving these three problems, I simply:
Restart Apache.
Launch my catalyst app from the command line using lines similar to the =
examples in the documentation.
Any advice on setting the -n flag? The=20
http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi#Run_your=
_app_as_a_FastCGI_process example decides to run three parallel =
instances.

UPDATE:
Just as I'm finishing this email, I see:
www.catalystframework.org/calendar/2006/16 suggests:
FastCgiExternalServer
/path/to/myapp/script/myapp_fastcgi.pl -host 127.0.0.1:55900
Alias / /path/to/myapp/script/myapp_fastcgi.pl/
# or Alias /myapp/ /path/to/myapp/script/myapp_fastcgi.pl/ to run at a =
non root location

My Catalyst app is at:
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.p=
l
Should I interpret that as....
FastCgiExternalServer =
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.p=
l -host 127.0.0.1:55900
Alias /myapp/ =
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.p=
l/
....?
Would that work as a solution to problem two?
If so - problem three - where would I put it? ^_^.

Feedback appreciated - as this is something I could waste whole days =
reading multiple tutorials on!
Already taken me a day to learn all I had to do was type three simple =
command lines to install mod_fastcgi, =3DP....!!

Huge thanks people,

Yours,
Andrew.

------=_NextPart_000_0089_01D10925.8D52AA60
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
<META content=3D"MSHTML 5.50.4807.2300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2><FONT size=3D2><FONT size=3D2>Could someone help me, =
with a bit of=20
plain english please?</FONT></DIV>
<DIV>
<DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>Am finding&nbsp;the tutorials on getting mod_fastcgi =
installed=20
and working a tad confusing.</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT size=3D2>I have a VPS with Cpanel and WHM.</FONT></DIV>
<DIV><FONT size=3D2>Apache 2.2.24</FONT></DIV>
<DIV><FONT size=3D2>A number of different user directories,</FONT></DIV>
<DIV>only one of which has to run a Catalyst app.</DIV>
<DIV>[Although it would be nice to use&nbsp;one user as a dev server, =
and=20
another user as a production server]</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2>I have downloaded <A=20
href=3D"http://fastcgi.com/dist/mod_fastcgi-current.tar.gz">http://fastcg=
i.com/dist/mod_fastcgi-current.tar.gz</A></FONT></DIV>
<DIV><FONT size=3D2>I extracted this on the hard drive of my MacBook=20
Pro.</FONT></DIV>
<DIV><FONT size=3D2>This gave me the folder:</FONT></DIV>
<DIV><FONT size=3D2>mod_fastcgi-2.4.6</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>On my VPS, my apache appeared to be installed at=20
/usr/local/apache</FONT></DIV>
<DIV><FONT size=3D2>...so I opened up Makefile.AP2 within the =
mod_fastcgi-2.4.6=20
folder on my laptop, using a text editor, and changed:</FONT></DIV>
<DIV><FONT size=3D2>top_dir&nbsp;&nbsp;&nbsp; =3D =
/usr/local/apache2</FONT></DIV>
<DIV><FONT size=3D2>to the following:</FONT></DIV>
<DIV><FONT size=3D2>top_dir&nbsp;&nbsp;&nbsp; =3D =
/usr/local/apache</FONT></DIV>
<DIV><FONT size=3D2>...so that the top directory path would be=20
correct.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I then uploaded the entire mod_fastcgi-2.4.6 folder =
to the=20
root of my VPS.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I opened a terminal window and logged in as root, =
using=20
SSH.</FONT></DIV>
<DIV><FONT size=3D2>I changed directory to the folder I'd just=20
uploaded:</FONT></DIV>
<DIV><FONT size=3D2>cd mod_fastcgi-2.4.6</FONT></DIV>
<DIV><FONT size=3D2>Then I entered the three command lines in the =
installation=20
instructions, one after each other:</FONT></DIV>
<DIV><FONT size=3D2>cp Makefile.AP2 Makefile</FONT></DIV>
<DIV><FONT size=3D2>make</FONT></DIV>
<DIV><FONT size=3D2>make install</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I then browsed to the folder:</FONT></DIV>
<DIV><FONT size=3D2>/usr/local/apache/modules/</FONT></DIV>
<DIV><FONT size=3D2>...and saw the file: </FONT></DIV>
<DIV><FONT size=3D2>mod_fastcgi.so</FONT></DIV>
<DIV><FONT size=3D2>...&nbsp;was now in there, so assumed that's =
mod_fastcgi=20
installed! =3DD Hooray!</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>So now I believe I need to:</FONT></DIV>
<DIV><FONT size=3D2>Configure Apache.</FONT></DIV>
<DIV><FONT size=3D2>Restart Apache.</FONT></DIV>
<DIV><FONT size=3D2>Run my Catalyst App.</FONT></DIV>
<DIV><FONT size=3D2>....and this is where I'm having =
trouble.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Here are my problems:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>PROBLEM ONE:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Tutorials imply the following line should be added =
to the=20
httpd.conf file:</FONT></DIV>
<DIV><FONT size=3D2>LoadModule fastcgi_module =
modules/mod_fastcgi.so</FONT></DIV>
<DIV><FONT size=3D2>...with modules being the folder mod_fastcgi.so is =
in on my=20
VPS.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>So - my first question - where in httpd.conf do I =
put=20
it?</FONT></DIV>
<DIV><FONT size=3D2>At the very start?</FONT></DIV>
<DIV><FONT size=3D2>In between&nbsp;the &lt;Virtual Host&gt;&nbsp;tags=20
for&nbsp;the&nbsp;domain name I want the Catalyst App to be =
at?</FONT></DIV>
<DIV><FONT size=3D2>In the include conf files, for my domain name (the =
includes=20
are in the last line before the virtual host tag closes)?</FONT></DIV>
<DIV><FONT size=3D2>Or do I forget about httpd.conf entirely, and shove =
it in a=20
.htaccess file, in my app's directory?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>From what I gather, External (aka =
Standalone&nbsp;Server Mode,=20
aka as just Server) is the best mode to run the app under.</FONT></DIV>
<DIV><FONT size=3D2>This brings us nicely to....</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>PROBLEM TWO:</FONT></DIV>
<DIV><FONT size=3D2><A=20
href=3D"http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi#=
Configure_Apache">http://wiki.catalystframework.org/wiki/deployment/apach=
e_fastcgi#Configure_Apache</A></FONT></DIV>
<DIV><FONT size=3D2>...gets pretty confusing here.</FONT></DIV>
<DIV><FONT size=3D2>It gives the example of:</FONT></DIV>
<DIV><FONT size=3D2>&lt;IfModule mod_fastcgi.c&gt;<BR>&nbsp; =
FastCgiExternalServer=20
/tmp/myapp.fcgi -host myhost:8081<BR>&nbsp; Alias =
/myapp/&nbsp;&nbsp;&nbsp;=20
/tmp/myapp.fcgi/<BR>&lt;/IfModule&gt;</FONT></DIV>
<DIV><FONT size=3D2>I need to know how to customise this for my=20
purposes.</FONT></DIV>
<DIV><FONT size=3D2>My server does have a /tmp/ directory, and I =
understand=20
myapp.fcgi is totally fictional and shouldn't exist.</FONT></DIV>
<DIV><FONT size=3D2>Now - what about the rest of the first line? -host=20
myhost:8081</FONT></DIV>
<DIV><FONT size=3D2>Documentation says we should change hostname and =
port as=20
appropriate.</FONT></DIV>
<DIV><FONT size=3D2>What throws me is that the next bullet point says =
that if the=20
catalyst app is actually on our apache server, that we should use =
"-socket=20
&lt;filename&gt;" instead of "-port &lt;n&gt;" .... this is odd, because =
in the=20
example, there is no "-port &lt;n&gt;" used anywhere. It then goes on to =
say=20
using "-host" will still work... then&nbsp;says we should use =
"localhost" as the=20
hostname... before then saying we could use "user -port" instead,=20
O_o.</FONT></DIV>
<DIV><FONT size=3D2>So should the line be:</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; FastCgiExternalServer /tmp/myapp.fcgi -host =
<A=20
href=3D"http://www.mydomainname.com:8081">www.mydomainname.com:8081</A></=
FONT></DIV>
<DIV><FONT size=3D2>...or:</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; FastCgiExternalServer /tmp/myapp.fcgi -host=20
localhost:8081</FONT></DIV>
<DIV><FONT size=3D2>...or:</FONT></DIV>
<DIV><FONT size=3D2>
<DIV><FONT size=3D2>&nbsp; FastCgiExternalServer /tmp/myapp.fcgi -socket =

some-sort-of-filename-goes-here</FONT></DIV>
<DIV>(...which raises the question - what filename?&nbsp;mod_fastcgi=20
documentation says the filename of the unix domain socket the app uses =
to=20
communicate with the web server - I have no idea what that is, =
=3DS.&nbsp;)</DIV>
<DIV>...or:</DIV>
<DIV>
<DIV><FONT size=3D2>&nbsp; FastCgiExternalServer =
/tmp/myapp.fcgi&nbsp;gamextra=20
-8081</FONT></DIV>
<DIV>(..my attempt at interpreting user -port)</DIV></DIV>
<DIV></FONT><FONT size=3D2>...or should the line be something else =
entirely??=20
</FONT></DIV></DIV>
<DIV><FONT size=3D2>I'm assuming:</FONT></DIV>
<DIV><FONT size=3D2>&nbsp; Alias /myapp/&nbsp;&nbsp;&nbsp;=20
/tmp/myapp.fcgi/<BR>...will be entirely correct as it is, =
yes?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>PROBLEM THREE:</FONT></DIV>
<DIV><FONT size=3D2>Where do I put...</FONT></DIV>
<DIV><FONT size=3D2>&lt;IfModule mod_fastcgi.c&gt;<BR>&nbsp; =
FastCgiExternalServer=20
/tmp/myapp.fcgi -host localhost:8081<BR>&nbsp; Alias =
/myapp/&nbsp;&nbsp;&nbsp;=20
/tmp/myapp.fcgi/<BR>&lt;/IfModule&gt;</DIV>
<DIV>....?&nbsp;The same place we put the LoadModule line in PROBLEM=20
ONE...?</DIV>
<DIV>&nbsp;</DIV>
<DIV>I assume after solving these three problems, I simply:</DIV>
<DIV>Restart Apache.</DIV>
<DIV>Launch my catalyst app from the command line using lines similar to =
the=20
examples in the documentation.</DIV>
<DIV>Any advice on setting the -n flag? The=20
<DIV><FONT size=3D2><A=20
href=3D"http://wiki.catalystframework.org/wiki/deployment/apache_fastcgi#=
Run_your_app_as_a_FastCGI_process">http://wiki.catalystframework.org/wiki=
/deployment/apache_fastcgi#Run_your_app_as_a_FastCGI_process</A>=20
example decides to run three parallel instances.</FONT></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>UPDATE:</DIV>
<DIV>Just as I'm finishing this email, I see:</DIV>
<DIV><A=20
href=3D"http://www.catalystframework.org/calendar/2006/16">www.catalystfr=
amework.org/calendar/2006/16</A>=20
suggests:</DIV>
<DIV>FastCgiExternalServer<BR>/path/to/myapp/script/myapp_fastcgi.pl =
-host=20
127.0.0.1:55900<BR>Alias / /path/to/myapp/script/myapp_fastcgi.pl/<BR># =
or Alias=20
/myapp/ /path/to/myapp/script/myapp_fastcgi.pl/ to run at a non root=20
location<BR></DIV>
<DIV>My Catalyst app is at:</DIV>
<DIV>/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fast=
cgi.pl</DIV>
<DIV>Should I interpret that as....</DIV>
<DIV>FastCgiExternalServer=20
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.p=
l -host=20
127.0.0.1:55900<BR>Alias /myapp/=20
/home/gamextra/public_html/GXCatalystTest/script/gxcatalysttest_fastcgi.p=
l/</DIV>
<DIV>....?</DIV>
<DIV>Would that work as a solution to problem two?</DIV>
<DIV>If so - problem three - where would I put it? ^_^.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Feedback appreciated - as this is something I could waste whole =
days=20
reading multiple tutorials on!</DIV>
<DIV>Already taken me a day to learn all I had to do was type three =
simple=20
command lines to install mod_fastcgi, =3DP....!!</DIV>
<DIV>&nbsp;</DIV>
<DIV>Huge thanks people,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Yours,</DIV>
<DIV>Andrew.</FONT></DIV></DIV></FONT></FONT></DIV></BODY></HTML>

------=_NextPart_000_0089_01D10925.8D52AA60--




More information about the Catalyst mailing list