Configuration
Configuration Apache 2.4
Packages to install
- apache2
- libapache2-mod-fcgid
Steps to do as root
- Install software
- on Debian
$ apt-get install apache2 libapache2-mod-fcgid
- on Debian
- Enable module
- on Debian
$ a2enmod fcgid
- on Debian
- Update configuration (i.e /etc/apache2/sites-enabled/000-default.conf)
- For normal usage (Application ends with fcgi)
Alias /cgi/ <folder>/ <Directory <folder>/> SetHandler fcgid-script Options +ExecCGI # Customize the next two directives for your requirements. Order allow,deny Allow from all </Directory>
-
Replace html and ico You need an index.html file in this directory to get it to work <Directory <default_dir>/> AddHandler fcgid-script .html .ico FCGIWrapper <app folder>/<app>.fcgi .html virtual FCGIWrapper <app folder>/<app>.fcgi .ico virtual Options +ExecCGI # Customize the next two directives for your requirements. Order allow,deny Allow from all </Directory>
- For normal usage (Application ends with fcgi)
- Restart server
$ /etc/init.d/apache2 restart
Configuration Lighttpd
Package to install
- lighttpd
Steps to do as root
- Install software
- On Debian
$ apt-get install lighttpd
- On Debian
- Enable module
- on Debian
$ lighttpd-enable-mod fastcgi ssl
- on Debian
- Update configuration lighttpd.conf
- For normal usage (Application ends with fcgi)
fastcgi.debug = 1 # for debugging fastcgi.server = ( ".fcgi" => ( "<app>.fcgi.handler" => ( "socket" => "/tmp/<app>.fcgi.socket", "check-local" => "disable", "bin-path" => "/<app folder>/<app>.fcgi", "max-procs" => 1, ) ) )
- Replace html and ico
fastcgi.server = ( ".ico" => ( "<app>.fcgi.handler" => ( "socket" => "/tmp/<ico>.socket", "check-local" => "disable", "bin-path" => "/<app folder>/<app>.fcgi", "max-procs" => 1, ) ), ".html" => ( "<app>.fcgi.handler" => ( "socket" => "/tmp/<html>.socket", "check-local" => "disable", "bin-path" => "/<app folder>/<app>.fcgi", "max-procs" => 1, ) ) )
- For normal usage (Application ends with fcgi)
- Restart server
$ /etc/init.d/lighttpd restart