💾 Archived View for chirale.org › 2013-07-15_1205.gmi captured on 2024-08-18 at 17:36:13. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-05-12)
-=-=-=-=-=-=-
I’m starting to use the gunicorn django app using supervisord. Here my configuration:
Only the port 80 is exposed to other clients than localhost. The Varnish default backend is Apache (localhost:8080). I have a Drupal installation and a django installation on the same machine: since I want to expose django on the same domain at a defined location, I add to Apache this location:
ProxyRequests Off
ProxyPreserveHost On
Order deny,allow
Allow from all
\# on port 4180 gunicorn is running
\# @see /etc/supervisor.conf
ProxyPass /foo http://localhost:4180/
ProxyPassReverse /foo http://localhost:4180/
Order allow,deny
Allow from all
AddOutputFilterByType DEFLATE text/html
=> http://localhost:4180/
=> http://localhost:4180/
You can omit AddOutputFilterByType DEFLATE text/html: here I just take the response from gunicorn, compress and then serve to the client in this way:
(client) -\> varnish -\> apache -\> gunicorn
Here an example of what I get:
=> https://chirale.wordpress.com/wp-content/uploads/2013/07/chrommi.png?w=586 Image
It’s a big page, but using gzip from 2 MB of the uncompressed page I get 417 KB gzipped text/html, less than 1/4 of the original!
Read also on the same topic: How to enable gzip on proxy servers on nginx
How to enable gzip on proxy servers on nginx
https://web.archive.org/web/20130715000000*/http://supervisord.org/
https://web.archive.org/web/20130715000000*/https://www.varnish-cache.org/
https://web.archive.org/web/20130715000000*/http://localhost:4180/
/> ProxyPassReverse /foo <a href=
https://web.archive.org/web/20130715000000*/http://localhost:4180/