fpm_service.conf.j2 739 B

12345678910111213141516171819202122232425262728293031
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name {{item.server_name}};
  5. root {{item.root | default('/var/www/html/')}};
  6. index index.html index.html index.htm index.php;
  7. # keepalive_timeout 200;
  8. {{item.custom_config | default('') | indent(2)}}
  9. location / {
  10. try_files $uri $uri/ /index.php?$args;
  11. }
  12. location ~ \.php$ {
  13. include snippets/fastcgi-php.conf;
  14. fastcgi_pass {{item.proxy_pass | default('unix:/run/php/php7.3-fpm.sock')}};
  15. {{item.custom_fastcgi_config | default('') | indent(2)}}
  16. }
  17. # compression
  18. gzip on;
  19. gzip_types text/plain application/xml application/json;
  20. gzip_proxied no-cache no-store private expired auth;
  21. gzip_min_length 1000;
  22. # cache
  23. proxy_cache STATIC;
  24. }