infra/roles/stable/nginx/templates/fpm_service.conf.j2
2021-02-10 22:56:05 +01:00

31 lines
739 B
Django/Jinja

server {
listen 80;
listen [::]:80;
server_name {{item.server_name}};
root {{item.root | default('/var/www/html/')}};
index index.html index.html index.htm index.php;
# keepalive_timeout 200;
{{item.custom_config | default('') | indent(2)}}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass {{item.proxy_pass | default('unix:/run/php/php7.3-fpm.sock')}};
{{item.custom_fastcgi_config | default('') | indent(2)}}
}
# compression
gzip on;
gzip_types text/plain application/xml application/json;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
# cache
proxy_cache STATIC;
}