Sign in Join

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

Mailing lists / lazarus / 2010-12

fpweb fastcgi debug

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Unknown author
to ik
ik wrote
Hello, Is there a way for me to use the fastcgi application I'm writing as a standalone for easier debugging (instead of restarting Apache every time) ?

Yes you can.

If you can use mod_fastcgi, then this will do it:

- Run the fastcgi application, and explicitly set the port.

   Application.Port:=2015

- In Apache, set
FastCgiExternalServer /path/to/server/url -host 127.0.0.1:201 -idle-timeout 30 -flush

Now you can debug the fastcgi application.

If you can't use mod_fastcgi, run the application as described above, and use the cgigateway (demo is in packages/fcl-web/tests) to route the requests to your Fastcgi server.

Michael.

Reply by email

ik
to Unknown author

Thanks, now i can test the templeting issue finally :)

Ido
LINESIP - Opening the source for communication
http://www.linesip.com
http://www.linesip.co.il

Show quoted text 34 lines
On Thu, 23 Dec 2010, ik wrote: Hello, > > Is there a way for me to use the fastcgi application I'm writing as a > standalone for easier debugging (instead of restarting Apache every time) > ? > Yes you can. If you can use mod_fastcgi, then this will do it: - Run the fastcgi application, and explicitly set the port. Application.Port:=2015 - In Apache, set FastCgiExternalServer /path/to/server/url -host 127.0.0.1:201-idle-timeout 30 -flush Now you can debug the fastcgi application. If you can't use mod_fastcgi, run the application as described above, and use the cgigateway (demo is in packages/fcl-web/tests) to route the requests to your Fastcgi server. Michael. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101223/3d34c9ed/attachment.html>

Reply by email

waldo kitty
to Unknown author: Yes you can. If you can use mod_fastcgi, then this will do it: - Run the fastcgi…
Show quoted text 7 lines
If you can use mod_fastcgi, then this will do it: - Run the fastcgi application, and explicitly set the port. Application.Port:=2015 - In Apache, set FastCgiExternalServer /path/to/server/url -host 127.0.0.1:201 -idle-timeout 30 -flush

is there a typo in the above? port 2015 and port 201 ?? i'm guessing that they should be the same port??

Reply by email

ik
to waldo kitty
waldo kitty wrote 13 lines
On 12/23/2010 05:34, wrote: > If you can use mod_fastcgi, then this will do it: > > - Run the fastcgi application, and explicitly set the port. > Application.Port:=2015 > - In Apache, set > FastCgiExternalServer /path/to/server/url -host 127.0.0.1:201-idle-timeout 30 > -flush > is there a typo in the above? port 2015 and port 201 ?? i'm guessing that they should be the same port??

Yes they must be the same port.

The only thing I do not understand is why FastCgiExternalServer require the path of the fastcgi server, if it can be a remote application and not local.

Show quoted text 9 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Ido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101224/3406aa56/attachment.html>

Reply by email

Michael Van Canneyt
to ik
ik wrote 19 lines
On Fri, Dec 24, 2010 at 01:46, waldo kitty wrote: On 12/23/2010 05:34, wrote: If you can use mod_fastcgi, then this will do it: - Run the fastcgi application, and explicitly set the port. Application.Port:=2015 - In Apache, set FastCgiExternalServer /path/to/server/url -host 127.0.0.1:201 -idle-timeout 30 -flush is there a typo in the above? port 2015 and port 201 ?? i'm guessing that they should be the same port?? Yes they must be the same port. The only thing I do not understand is why FastCgiExternalServer require the path of the fastcgi server, if it can be a remote application and not local.

Simple: because it needs to know which URL to map on the fastcgi app. for 'regular' fastcgi it knows this through the .fcgi extension of the filename. For external fastcgi, there is no filename, so Apache needs to be told which url(s) map to the external fastcgi server.

Michael.

Reply by email

waldo kitty
to ik: Yes they must be the same port. The only thing I do not understand is why…
ik wrote 19 lines
On Fri, Dec 24, 2010 at 01:46, waldo kitty < <mailto:>> wrote: On 12/23/2010 05:34, <mailto:> wrote: If you can use mod_fastcgi, then this will do it: - Run the fastcgi application, and explicitly set the port. Application.Port:=2015 - In Apache, set FastCgiExternalServer /path/to/server/url -host 127.0.0.1:201 <http://127.0.0.1:201> -idle-timeout 30 -flush is there a typo in the above? port 2015 and port 201 ?? i'm guessing that they should be the same port?? Yes they must be the same port.

ok :)

The only thing I do not understand is why FastCgiExternalServer require the path of the fastcgi server, if it can be a remote application and not local.

i imagine that "path to server" would be a URL (as indicated)... the host is separated from the url as one sees with "http://foo.bar/some/path" and only needs to specify "/some/path" since the host parameter carries the "foo.bar" portion...

Reply by email