Unverified Commit fc23daf5 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

nginx: move the fastcgi cache configuration to the archwiki role

This is much cleaner because the nginx role does not have to set the
fastcgi_cache variable to "false" by default, which was overridden by
host_vars/apollo.archlinux.org to "wiki", but the value was still
hardcoded in the config.

At first, I was wondering that the cache "zone" name should be
generalized to improve the configuration (from the original per-host to
per-service), but that would be an overkill since the fastcgi cache is
used only for the wiki...
parent b4c97002
......@@ -36,5 +36,3 @@ fail2ban_jails:
sshd: true
postfix: true
dovecot: false
fastcgi_cache: wiki
fastcgi_cache_path /etc/nginx/wikicache levels=1:2 keys_zone=wiki:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
upstream archwiki {
server unix://{{ archwiki_socket }};
}
......
---
letsencrypt_validation_dir: "/var/lib/letsencrypt"
fastcgi_cache: false
......@@ -72,11 +72,6 @@ http {
index index.php index.html index.htm;
{% if fastcgi_cache %}
fastcgi_cache_path /etc/nginx/wikicache levels=1:2 keys_zone=wiki:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
{% endif %}
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_http main;
include snippets/sslsettings.conf;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment