当前位置: 动力学知识库 > 问答 > 编程问答 >

apache - how to run fastcgi

问题描述:

I have fastcgi installed and running. I downloaded a developerkit from fastcgi.com. It had some examples in it. One of the example files echos some stuff. It required a .libs and a .deps I put those folders along with a echo.fcgi file and into the webroot/cgi-bin. If I got to the echo.fcgi url, it works great.

I created a simple c file that prints hello world. I compile it using

gcc -Wall -o main -lfcgi main.c

What do I do with it now? Does it require something like a perl script or php script to be executed. Or, should I just be able to put it in the webroot/cgi-bin folder and go to it's url?

网友答案:

Thanks to this guy I found that I don't need a wrapper. If I add

AppClass "/Library/WebServer/Documents/MyFCGITest"

to my httpd.conf file. I can get my executable running.

网友答案:

so you wrote your own server to the fcgi standard?

helpful start: http://httpd.apache.org/mod_fcgid/

reasonable example installed in conf.d/mod_fcgid.conf

would guess you want to use FastCgiServer

or if you wanted to let the default fcgi server handle connections etc... FCGIWrapper

hope that helps.

分享给朋友:
您可能感兴趣的文章:
随机阅读: