====== WWW_GLPI.conf ======

<WRAP center round important 60%>
**__Не забываем менять доменное имя, IP и PORT!!!__**
</WRAP>

<code bash>server {
listen 8082;
server_name IP;
root /var/www/glpi;
index index.php index.html index.htm;

real_ip_header X-Real-IP;

client_max_body_size 10m;

keepalive_timeout 60;
add_header Strict-Transport-Security 'max-age=604800';

proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;

        location / {
        try_files $uri $uri/ =404;
        autoindex on;
        }

        location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico|woff)$ {
        access_log off;
        expires max;
        }

        location /api {
        rewrite ^/api/(.*)$ /apirest.php/$1 last;
        }

        location ~ \.php$ {
        try_files $uri = 404;
        fastcgi_index index.php;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SERVER_NAME $host;
        fastcgi_param HTTPS on;
        fastcgi_intercept_errors on;
        fastcgi_ignore_client_abort off;
        fastcgi_connect_timeout 60;
        fastcgi_send_timeout 180;
        fastcgi_read_timeout 180;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
        fastcgi_param PHP_VALUE "
                memory_limit = 64M
                file_uploads = on
                max_execution_time = 600
                session.auto_start = off
                session.use_trans_sid = 0
                ";
        }

        location = /favicon.ico {
        log_not_found off;
        access_log off;
        }

        location = /robots.txt {
        #allow all;
        deny all;
        log_not_found off;
        access_log off;
        }

        location ~ /\.ht {
        deny all;
        }
}
</code>