Add caching to nginx config in readme.
This commit is contained in:
parent
3a159bbbfc
commit
41939e249f
34
README.adoc
34
README.adoc
|
@ -27,22 +27,30 @@ tools to generate a HTML list and an RSS generator.
|
|||
.nginx config
|
||||
[source,nginx]
|
||||
--------------------------------------------------------------------------------
|
||||
# […]
|
||||
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=fediblock:10m;
|
||||
fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
||||
add_header X-Cache $upstream_cache_status;
|
||||
|
||||
expires 1h;
|
||||
server {
|
||||
# […]
|
||||
|
||||
location /add {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/cgi-fcgiwrap.socket-1;
|
||||
fastcgi_param SCRIPT_FILENAME /usr/bin/fediblock-backend;
|
||||
fastcgi_param HOME "/var/lib/nginx"; # When I didn't set it, HOME was /root.
|
||||
}
|
||||
expires 1h;
|
||||
|
||||
location /rss {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/cgi-fcgiwrap.socket-1;
|
||||
fastcgi_param SCRIPT_FILENAME /usr/bin/fediblock-backend-gen_rss;
|
||||
fastcgi_param HOME "/var/lib/nginx";
|
||||
location /add {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/cgi-fcgiwrap.socket-1;
|
||||
fastcgi_param SCRIPT_FILENAME /usr/bin/fediblock-backend;
|
||||
fastcgi_param HOME "/var/lib/nginx"; # When I didn't set it, HOME was /root.
|
||||
}
|
||||
|
||||
location /rss {
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/cgi-fcgiwrap.socket-1;
|
||||
fastcgi_param SCRIPT_FILENAME /usr/bin/fediblock-backend-gen_rss;
|
||||
fastcgi_param HOME "/var/lib/nginx";
|
||||
fastcgi_cache fediblock;
|
||||
fastcgi_cache_valid 200 10m;
|
||||
}
|
||||
}
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
Reference in New Issue