Skip to content
Myr

Update example for Apache FCGI config to use worker processes using FastCgiServer, along with some notes about FastCgiExternalServer

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Eric Radman · committed by Eric Radman · parent 6a62144 · Browse files · 1 file+27 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+27 added−6 removed

  • other:+27 added−6 removed

1 file+27 added−6 removed

modified:docs/deploying/fastcgi.rst+27 added-6 removed
53 unmodified lines
54Configuring Apache55------------------5657The example above is good enough for a basic Apache deployment but your `.fcgi`58file will appear in your application URL59e.g. example.com/yourapplication.fcgi/news/. There are few ways to configure60your application so that yourapplication.fcgi does not appear in the URL. A61preferable way is to use the ScriptAlias configuration directive::58file will appear in your application URL e.g.59example.com/yourapplication.fcgi/news/. There are few ways to configure your60application so that yourapplication.fcgi does not appear in the URL. A61preferable way is to use the ScriptAlias and SetHandler configuration directives62to route requests to the FastCGI server. The following example uses63FastCgiServer to start 5 instances of the application which will handle all64incomming requests:6566 LoadModule fastcgi_module /usr/lib64/httpd/modules/mod_fastcgi.so6768 FastCgiServer /var/www/html/yourapplication/app.fcgi -idle-timeout 300 -processes 56970 <VirtualHost *>64 ServerName example.com65 ScriptAlias / /path/to/yourapplication.fcgi/71 ServerName webapp1.mydomain.com72 DocumentRoot /var/www/html/yourapplication7374 AddHandler fastcgi-script fcgi75 ScriptAlias / /var/www/html/yourapplication/app.fcgi/7677 <Location />78 SetHandler fastcgi-script79 </Location>80 </VirtualHost>8182These processes will be managed by Apache. If you're using an standalone FastCGI83server, you can use the FastCgiExternalServer directive instead. Note that in84the following the path is not real, it's simply used as an identifier to other85directives such as AliasMatch:8687 FastCgiServer /var/www/html/yourapplication -host 127.0.0.1:30008889If you cannot set ScriptAlias, for example on an shared web host, you can use90WSGI middleware to remove yourapplication.fcgi from the URLs. Set .htaccess::9192 <IfModule mod_fcgid.c>
146 unmodified lines