Recent

Author Topic: FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux  (Read 132439 times)

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux
« Reply #45 on: August 25, 2021, 04:06:49 pm »
I install alibaba TENGINE for NGINX.

It seems well done.

There is FastCGI module but to let Fast CGI working i need to use fcgi wrapper.

How can i do ? I have 502 bad gateway error.

My config :
server {
 
        listen       80;
        server_name  localhost;
        access_log  /var/log/nginx/fastcgi.access.log;
 
        index index.html index.php index.html;
        root /var/www;
 
        location /cgi
        {
 
        }
 
        location ~ \.fcgi$
        {
            include fastcgi_params;
#           fastcgi_pass unix:/var/run/fcgi.sock;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index  hellow.fcgi;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param AUTH_USER $remote_user;
            fastcgi_param REMOTE_USER $remote_user;
        }
}
« Last Edit: August 26, 2021, 02:16:54 am by matthius »
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

nicanor

  • New Member
  • *
  • Posts: 17
Re: FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux
« Reply #46 on: October 04, 2021, 12:50:07 pm »
Hi

I found this page showing information about to configure nginx and fastcgi: https://difyel.com/nginx/how-to-setup-nginx-with-cgi-fastcgi-and-c-bash-lisp-or-any-other-programming-language-on-debian-and-freebsd/index.html

In the first example the autor shows how to set nginx whit a fastcgi wrapper to CGI. And second he shows how to use a fastcgi server with nginx .... (Well, at least, it was i understood... Sorry, I'm completely newbie in this area, and just learning)

Unfortunately I have no success applying the second way in my local machine whit ubuntu. Hope this may be useful for you!

Cheers

nicanor

  • New Member
  • *
  • Posts: 17
Re: FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux
« Reply #47 on: October 04, 2021, 01:06:55 pm »
By the way, if you were to start developing a new web application today... And wanted to use lazarus/fpc... As a matter of fact, you could tell me if the way is still to create fastcgi application, or is there some other way. It's just because I'm new even in this web area, sorry

egsuh

  • Hero Member
  • *****
  • Posts: 1489
Re: FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux
« Reply #48 on: October 04, 2021, 01:18:57 pm »
I have successfully tested NGINX with free pascal FastCGI.  Please refer to following thread.

https://forum.lazarus.freepascal.org/index.php/topic,56583.msg420471.html#msg420471

I experienced some problems with FastCGI with MS IIS, but this problem does not happen with NGINX.

@nicanor,

I do not have a wide experience but Lazarus/FPC is quite useful tool to develop web server application, based on my experience. I have set up a survey platform, and doing surveys with it.

fblu

  • Newbie
  • Posts: 4
Re: FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux
« Reply #49 on: November 19, 2021, 01:14:08 pm »
By the way, if you were to start developing a new web application today... And wanted to use lazarus/fpc... As a matter of fact, you could tell me if the way is still to create fastcgi application, or is there some other way. It's just because I'm new even in this web area, sorry
I'm not much of a webdev either, but if  you want to create a REST API and want to use fpc, you can use Horse ( https://github.com/HashLoad/horse ).

matthius

  • Full Member
  • ***
  • Posts: 164
  • Creating VRAD...
    • LIBERLOG - Développement rapide
Re: FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux
« Reply #50 on: April 27, 2022, 12:16:41 pm »
On 2021, there is a Fast CGI development kit called fcgi2 :
http://fastcgi-archives.github.io/fcgi2/doc/fcgi-devel-kit.htm

But they are very poor in examples which not exists as in documentation.

I do not know how to use it on 2022-04. For example, we don't see any link to a fastcgi in html pages.
« Last Edit: April 27, 2022, 12:25:26 pm by matthius »
M. GIROUX
13 rue Tanguy PRIGENT
35000 RENNES - France
http://liberlog.fr

 

TinyPortal © 2005-2018