Update example for Apache FCGI config to use worker processes using FastCgiServer, along with some notes about FastCgiExternalServer
This commit is contained in:
parent
6a621440ef
commit
73b4a52ca5
1 changed files with 27 additions and 6 deletions
|
|
@ -55,16 +55,37 @@ Configuring Apache
|
|||
------------------
|
||||
|
||||
The example above is good enough for a basic Apache deployment but your `.fcgi`
|
||||
file will appear in your application URL
|
||||
e.g. example.com/yourapplication.fcgi/news/. There are few ways to configure
|
||||
your application so that yourapplication.fcgi does not appear in the URL. A
|
||||
preferable way is to use the ScriptAlias configuration directive::
|
||||
file will appear in your application URL e.g.
|
||||
example.com/yourapplication.fcgi/news/. There are few ways to configure your
|
||||
application so that yourapplication.fcgi does not appear in the URL. A
|
||||
preferable way is to use the ScriptAlias and SetHandler configuration directives
|
||||
to route requests to the FastCGI server. The following example uses
|
||||
FastCgiServer to start 5 instances of the application which will handle all
|
||||
incomming requests:
|
||||
|
||||
LoadModule fastcgi_module /usr/lib64/httpd/modules/mod_fastcgi.so
|
||||
|
||||
FastCgiServer /var/www/html/yourapplication/app.fcgi -idle-timeout 300 -processes 5
|
||||
|
||||
<VirtualHost *>
|
||||
ServerName example.com
|
||||
ScriptAlias / /path/to/yourapplication.fcgi/
|
||||
ServerName webapp1.mydomain.com
|
||||
DocumentRoot /var/www/html/yourapplication
|
||||
|
||||
AddHandler fastcgi-script fcgi
|
||||
ScriptAlias / /var/www/html/yourapplication/app.fcgi/
|
||||
|
||||
<Location />
|
||||
SetHandler fastcgi-script
|
||||
</Location>
|
||||
</VirtualHost>
|
||||
|
||||
These processes will be managed by Apache. If you're using an standalone FastCGI
|
||||
server, you can use the FastCgiExternalServer directive instead. Note that in
|
||||
the following the path is not real, it's simply used as an identifier to other
|
||||
directives such as AliasMatch:
|
||||
|
||||
FastCgiServer /var/www/html/yourapplication -host 127.0.0.1:3000
|
||||
|
||||
If you cannot set ScriptAlias, for example on an shared web host, you can use
|
||||
WSGI middleware to remove yourapplication.fcgi from the URLs. Set .htaccess::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue