Next: Working With MicroServer Applications, Previous: Deploying On lighttpd, Up: Working With Web Applications
Web applications built using FastCGI are normally started by the webserver. If you would like to start your web application by hand, perhaps because you want to run it under a profiler like callgrind, or you want to start it from a script, etc., that is possible too.
To start your web application by hand, set it up as an “external server” in your webserver's configuration file. For Apache, it would look like this:
<IfModule mod_fastcgi.c> FastCgiExternalServer /usr/lib/cgi-bin/myapp.fcgi -host localhost:9000 </IfModule>
The -host
option is a hostname and port where the web
application will be running. After restarting your webserver, start
your web application using the commandline options to specify the port
and web document root:
./myapp.fcgi --web-doc-root /var/www/myapp --external 9000
Any FastCGI web application compiled using Roadsend PHP can be started as an external server.