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