Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-10

Does Lazarus/FPC have a process launcher for FastCGI?

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank Church

Does Lazarus/FPC have its own process launcher for FastCGI?

I am going to try the existing scripts for nginx, but it looks like they use their FastCGI scripts to launch the Lazarus exe's as a CGI.

/vfclists

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101004/0db0fe66/attachment.html>

Reply by email

Michael Van Canneyt
to Frank Church
Frank Church wrote
Does Lazarus/FPC have its own process launcher for FastCGI?

Why would you need a process launcher ?

I am going to try the existing scripts for nginx, but it looks like they use their FastCGI scripts to launch the Lazarus exe's as a CGI.

Can you elaborate ? The webserver is supposed to start the CGI, and pass it a TCP/IP port to listen on. That's it.

Michael.

Reply by email

Frank Church
to Michael Van Canneyt
Michael Van Canneyt wrote 11 lines
On Mon, 4 Oct 2010, Frank Church wrote: Does Lazarus/FPC have its own process launcher for FastCGI? > Why would you need a process launcher ?

This is a new area for me. When I check the nginx, this is what I see.

1. At boot time, an fcgi launcher is loaded as part of the /etc/init.d sequence

2. This fcgi launcher is linked with an ip:port combination or unix socket, and specifies a program which launches the web developers cgi script.

3. The nginx configuration that for virtual host is configured with the same ip:port or unix socket. When it reads file names matching the cgi spec it dispatches them to the fcgi launcher listening on the ip:port, and this launches the cgi with the program it is configured with.

e.g for php programs, php files are sent to the php5-cgi executable via this command

#!/bin/sh
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -f /usr/bin/php5-cgi

From the nature of your reply I assume that the Lazarus exe takes the place

of the /usr/bin/php5-cgi.

I built the helloworld program and I am running it as a CGI. Should I assume that it is a FastCGI as well?

Show quoted text 17 lines
> I am going to try the existing scripts for nginx, but it looks like they > use > their FastCGI scripts to launch the Lazarus exe's as a CGI. > Can you elaborate ? The webserver is supposed to start the CGI, and pass it a TCP/IP port to listen on. That's it. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101004/c0cc3f0d/attachment.html>

Reply by email

Michael Van Canneyt
to Frank Church
Frank Church wrote 20 lines
On 4 October 2010 12:26, Michael Van Canneyt wrote: > > > On Mon, 4 Oct 2010, Frank Church wrote: > > Does Lazarus/FPC have its own process launcher for FastCGI? >> > > Why would you need a process launcher ? > > > This is a new area for me. When I check the nginx, this is what I see. 1. At boot time, an fcgi launcher is loaded as part of the /etc/init.d sequence 2. This fcgi launcher is linked with an ip:port combination or unix socket, and specifies a program which launches the web developers cgi script.

Ok, but this is a gateway to spawn CGI programs through fastcgi. For real FastCGI apps, you don't need this step.

Show quoted text 5 lines
3. The nginx configuration that for virtual host is configured with the same ip:port or unix socket. When it reads file names matching the cgi spec it dispatches them to the fcgi launcher listening on the ip:port, and this launches the cgi with the program it is configured with.

This must be done: define a location which will be dispatched to the fastcgi app.

Show quoted text 10 lines
e.g for php programs, php files are sent to the php5-cgi executable via this command #!/bin/sh /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -f /usr/bin/php5-cgi > From the nature of your reply I assume that the Lazarus exe takes the place of the /usr/bin/php5-cgi.

Yes.

I built the helloworld program and I am running it as a CGI. Should I assume that it is a FastCGI as well?

No.

Michael.

Reply by email

Frank Church
to Michael Van Canneyt
Michael Van Canneyt wrote 71 lines
On Mon, 4 Oct 2010, Frank Church wrote: On 4 October 2010 12:26, Michael Van Canneyt > wrote: > > >> >> On Mon, 4 Oct 2010, Frank Church wrote: >> >> Does Lazarus/FPC have its own process launcher for FastCGI? >> >>> >>> >> Why would you need a process launcher ? >> >> >> >> This is a new area for me. When I check the nginx, this is what I see. > > 1. At boot time, an fcgi launcher is loaded as part of the /etc/init.d > sequence > > 2. This fcgi launcher is linked with an ip:port combination or unix > socket, > and specifies a program which launches the web developers cgi script. > Ok, but this is a gateway to spawn CGI programs through fastcgi. For real FastCGI apps, you don't need this step. > 3. The nginx configuration that for virtual host is configured with the > same > ip:port or unix socket. When it reads file names matching the cgi spec it > dispatches them to the fcgi launcher listening on the ip:port, and this > launches the cgi with the program it is configured with. > This must be done: define a location which will be dispatched to the fastcgi app. > > e.g for php programs, php files are sent to the php5-cgi executable via > this > command > > #!/bin/sh > /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -f /usr/bin/php5-cgi > > From the nature of your reply I assume that the Lazarus exe takes the >> place >> > of the /usr/bin/php5-cgi. > Yes. > I built the helloworld program and I am running it as a CGI. Should I > assume > that it is a FastCGI as well? > No.

Are the examples of webmodule fastcgi's in the demos?

Show quoted text 9 lines
Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101004/5870e37a/attachment.html>

Reply by email

Michael Van Canneyt
to Frank Church
Frank Church wrote
Are the examples of webmodule fastcgi's in the demos?

No, since they're in no way different from CGIs as far as coding is concerned. Just the application type differs. Instead of choosing 'new cgi application', you must choose 'new fastcgi application'. All the rest remains the same.

Michael.

Reply by email