Forum > Networking and Web Programming

FCGI (FastCGI) step by step, using fpweb/fcl-web for Windows/Linux

<< < (10/11) > >>

matthius:
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;
        }
}

nicanor:
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:
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:
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:

--- Quote from: nicanor 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

--- End quote ---
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 ).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version