Skip to content
Myr

Various documentation fixups

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 9074bc4 · Browse files · 3 files+15 added−13 removed
This commit

State

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

Diff stats

3 files+15 added−13 removed

  • other:+15 added−13 removed

3 files+15 added−13 removed

modified:docs/deploying/fastcgi.rst+13 added-12 removed
52 unmodified lines
5354Configuring Apache55------------------5657The example above is good enough for a basic Apache deployment but your `.fcgi`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 all64incoming requests:57The example above is good enough for a basic Apache deployment but your58`.fcgi` file will appear in your application URL e.g.59example.com/yourapplication.fcgi/news/. There are few ways to configure60your application so that yourapplication.fcgi does not appear in the URL.61A preferable way is to use the ScriptAlias and SetHandler configuration62directives to route requests to the FastCGI server. The following example63uses FastCgiServer to start 5 instances of the application which will64handle all incoming requests::6566 LoadModule fastcgi_module /usr/lib64/httpd/modules/mod_fastcgi.so6768 FastCgiServer /var/www/html/yourapplication/app.fcgi -idle-timeout 300 -processes 5
9 unmodified lines
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:82These processes will be managed by Apache. If you're using an standalone83FastCGI server, you can use the FastCgiExternalServer directive instead.84Note that in the following the path is not real, it's simply used as an85identifier to other86directives such as AliasMatch::8788 FastCgiServer /var/www/html/yourapplication -host 127.0.0.1:30008990If you cannot set ScriptAlias, for example on an shared web host, you can use
150 unmodified lines
modified:docs/tutorial/dbinit.rst+1 added-1 removed
36 unmodified lines
37hand. Without an application context the :data:`~flask.g` object does not38know yet to which application it becomes as there could be more than one!3940The ``with app.app_context()`` statement establishes the application41context for us. In the body of the with statement the :flask:`~flask.g`41context for us. In the body of the with statement the :data:`~flask.g`42object will be associated with ``app``. At the end of the with statement43the association is released and all teardown functions are executed. This44means that our database connection is disconnected after the commit.45
24 unmodified lines
modified:docs/signals.rst+1 added
320 unmodified lines
321322 .. versionadded:: 0.10323324.. data:: flask.appcontext_popped325 :noindex:326327 This signal is sent when an application context is popped. The sender328 is the application. This usually falls in line with the329 :data:`appcontext_tearing_down` signal.
23 unmodified lines