Show More
@@ -656,7 +656,7 b' Sample config for Nginx using proxy:' | |||||
656 |
|
656 | |||
657 | ## uncomment root directive if you want to serve static files by nginx |
|
657 | ## uncomment root directive if you want to serve static files by nginx | |
658 | ## requires static_files = false in .ini file |
|
658 | ## requires static_files = false in .ini file | |
659 |
#root / |
|
659 | #root /srv/kallithea/kallithea/kallithea/public; | |
660 | include /etc/nginx/proxy.conf; |
|
660 | include /etc/nginx/proxy.conf; | |
661 | location / { |
|
661 | location / { | |
662 | try_files $uri @kallithea; |
|
662 | try_files $uri @kallithea; |
@@ -47,5 +47,35 b' 4. Scale Kallithea horizontally' | |||||
47 | that will separate regular user traffic from automated processes like CI |
|
47 | that will separate regular user traffic from automated processes like CI | |
48 | servers or build bots. |
|
48 | servers or build bots. | |
49 |
|
49 | |||
|
50 | 5. Serve static files directly from the web server | |||
|
51 | ||||
|
52 | With the default ``static_files`` ini setting, the Kallithea WSGI application | |||
|
53 | will take care of serving the static files found in ``kallithea/public`` from | |||
|
54 | the root of the application URL. While doing that, it will currently also | |||
|
55 | apply buffering and compression of all the responses it is serving. | |||
|
56 | ||||
|
57 | The actual serving of the static files is unlikely to be a problem in a | |||
|
58 | Kallithea setup. The buffering of responses is more likely to be a problem; | |||
|
59 | large responses (clones or pulls) will have to be fully processed and spooled | |||
|
60 | to disk or memory before the client will see any response. | |||
|
61 | ||||
|
62 | To serve static files from the web server, use something like this Apache config | |||
|
63 | snippet:: | |||
|
64 | ||||
|
65 | Alias /images/ /srv/kallithea/kallithea/kallithea/public/images/ | |||
|
66 | Alias /css/ /srv/kallithea/kallithea/kallithea/public/css/ | |||
|
67 | Alias /js/ /srv/kallithea/kallithea/kallithea/public/js/ | |||
|
68 | Alias /codemirror/ /srv/kallithea/kallithea/kallithea/public/codemirror/ | |||
|
69 | Alias /fontello/ /srv/kallithea/kallithea/kallithea/public/fontello/ | |||
|
70 | ||||
|
71 | Then disable serving of static files in the ``.ini`` ``app:main`` section:: | |||
|
72 | ||||
|
73 | static_files = false | |||
|
74 | ||||
|
75 | If using Kallithea installed as a package, you should be able to find the files | |||
|
76 | under site-packages/kallithea, either in your Python installation or in your | |||
|
77 | virtualenv. When upgrading, make sure to update the web server configuration | |||
|
78 | too if necessary. | |||
|
79 | ||||
50 |
|
80 | |||
51 | .. _SQLAlchemyGrate: https://github.com/shazow/sqlalchemygrate |
|
81 | .. _SQLAlchemyGrate: https://github.com/shazow/sqlalchemygrate |
General Comments 0
You need to be logged in to leave comments.
Login now