##// END OF EJS Templates
middleware: drop gzipper middleware...
Mads Kiilerich -
r6338:692dddf2 default
parent child Browse files
Show More
@@ -81,14 +81,13 b' Serve static files directly from the web'
81 -----------------------------------------------
81 -----------------------------------------------
82
82
83 With the default ``static_files`` ini setting, the Kallithea WSGI application
83 With the default ``static_files`` ini setting, the Kallithea WSGI application
84 will take care of serving the static files found in ``kallithea/public`` from
84 will take care of serving the static files from ``kallithea/public/`` at the
85 the root of the application URL. While doing that, it will currently also
85 root of the application URL.
86 apply buffering and compression of all the responses it is serving.
87
86
88 The actual serving of the static files is unlikely to be a problem in a
87 The actual serving of the static files is very fast and unlikely to be a
89 Kallithea setup. The buffering of responses is more likely to be a problem;
88 problem in a Kallithea setup - the responses generated by Kallithea from
90 large responses (clones or pulls) will have to be fully processed and spooled
89 database and repository content will take significantly more time and
91 to disk or memory before the client will see any response.
90 resources.
92
91
93 To serve static files from the web server, use something like this Apache config
92 To serve static files from the web server, use something like this Apache config
94 snippet::
93 snippet::
@@ -104,9 +103,16 b' Then disable serving of static files in '
104 static_files = false
103 static_files = false
105
104
106 If using Kallithea installed as a package, you should be able to find the files
105 If using Kallithea installed as a package, you should be able to find the files
107 under site-packages/kallithea, either in your Python installation or in your
106 under ``site-packages/kallithea``, either in your Python installation or in your
108 virtualenv. When upgrading, make sure to update the web server configuration
107 virtualenv. When upgrading, make sure to update the web server configuration
109 too if necessary.
108 too if necessary.
110
109
110 It might also be possible to improve performance by configuring the web server
111 to compress responses (served from static files or generated by Kallithea) when
112 serving them. That might also imply buffering of responses - that is more
113 likely to be a problem; large responses (clones or pulls) will have to be fully
114 processed and spooled to disk or memory before the client will see any
115 response. See the documentation for your web server.
116
111
117
112 .. _SQLAlchemyGrate: https://github.com/shazow/sqlalchemygrate
118 .. _SQLAlchemyGrate: https://github.com/shazow/sqlalchemygrate
@@ -20,7 +20,6 b' from paste.cascade import Cascade'
20 from paste.registry import RegistryManager
20 from paste.registry import RegistryManager
21 from paste.urlparser import StaticURLParser
21 from paste.urlparser import StaticURLParser
22 from paste.deploy.converters import asbool
22 from paste.deploy.converters import asbool
23 from paste.gzipper import make_gzip_middleware
24
23
25 from pylons.middleware import ErrorHandler, StatusCodeRedirect
24 from pylons.middleware import ErrorHandler, StatusCodeRedirect
26 from pylons.wsgiapp import PylonsApp
25 from pylons.wsgiapp import PylonsApp
@@ -105,7 +104,6 b' def make_app(global_conf, full_stack=Tru'
105 # Serve static files
104 # Serve static files
106 static_app = StaticURLParser(config['pylons.paths']['static_files'])
105 static_app = StaticURLParser(config['pylons.paths']['static_files'])
107 app = Cascade([static_app, app])
106 app = Cascade([static_app, app])
108 app = make_gzip_middleware(app, global_conf, compress_level=1)
109
107
110 app.config = config
108 app.config = config
111
109
General Comments 0
You need to be logged in to leave comments. Login now