12345678910111213141516171819202122232425262728293031 |
- server {
- listen 80;
- listen [::]:80;
- listen 443 ssl http2;
- 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.4-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;
- }
|