Nginx calls C + + written CGI program via spawn-fcgi

Source: Internet
Author: User

Installing Nginx and spawn-fcgi via Apt-get install

/usr/local/nginx/sbin/spawn-fcgi-a 127.0.0.1-p 9002-c 25-f/usr/local/nginx/cgibin/lzgfastcgi

The parameters have the following meanings:

-f Specifies the execution program location of the process that calls fastcgi, depending on the situation of PHP installed on the system
-a bind to address addr
-P binding to port ports
-S bound to the path of the UNIX socket
-c Specifies the number of processes generated by the fastcgi, which defaults to 5 (PHP only)
-p Specifies the PID file path of the resulting process
What identity is used by-u and-G fastcgi (-u user-G user group) to run, Ubuntu can be used under Www-data, other configurations, such as nobody, Apache, etc.

Configure nginx.conf Location~ \.cgi$ {Fastcgi_pass 127.0.0.1:9002;fastcgi_index index.cgi;fastcgi_param SCRIPT_ FILENAME fcgi$fastcgi_script_name;include Fastcgi_params;}

Nginx calls C + + written CGI program via spawn-fcgi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.