HEX
Server: nginx/1.29.3
System: Linux mail.sarafai.ru 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: root (0)
PHP: 7.4.33
Disabled: dl,exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: //etc/nginx/nginx.conf.prz_hosting
# Configuration File - Nginx Server Configs
# http://nginx.org/en/docs/dirindex.html

# Run as a unique, less privileged user for security reasons.
#user www www;
#user nginx;
user www-data;

# Sets the worker threads to the number of CPU cores available in the system for best performance.
# Should be > the number of CPU cores.
# Maximum number of connections = worker_processes * worker_connections
worker_processes auto;

# Maximum number of open files per worker process.
# Should be > worker_connections.
worker_rlimit_nofile 8192;

events {
    use epoll;
    # If you need more connections than this, you start optimizing your OS.
    # That's probably the point at which you hire people who are smarter than you as this is *a lot* of requests.
    # Should be < worker_rlimit_nofile.
    worker_connections 4096;
    multi_accept on;
}


# Log errors and warnings to this file
# This is only used when you don't override it on a server{} level
error_log  /var/log/nginx/error.log warn;

# The file storing the process ID of the main process
pid        /var/run/nginx.pid;

http {

  # Hide nginx version information.
  server_tokens off;

  # Specify MIME types for files.
  include       mime.types;
  default_type  application/octet-stream;

  # Update charset_types to match updated mime.types.
  # text/html is always included by charset module.
  charset_types text/css text/plain text/vnd.wap.wml application/javascript application/json application/rss+xml application/xml;

  # Include $http_x_forwarded_for within default format used in log files
  log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                    '$status $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for"';

  # Log access to this file
  # This is only used when you don't override it on a server{} level
  access_log /var/log/nginx/access.log main;

  # How long to allow each connection to stay idle.
  # Longer values are better for each individual client, particularly for SSL,
  # but means that worker connections are tied up longer.
  keepalive_timeout 40s;
  keepalive_requests 100;

  # Если клиент перестал читать отвечать, Nginx будет сбрасывать соединение с ним
  reset_timedout_connection on;

  # Будет ждать 10 секунд тело запроса от клиента, после чего сбросит соединение
  client_body_timeout 10;

  # Если клиент прекратит чтение ответа, Nginx подождет 2 секунды и сбросит соединение
  send_timeout 2;


  # Speed up file transfers by using sendfile() to copy directly
  # between descriptors rather than using read()/write().
  # For performance reasons, on FreeBSD systems w/ ZFS
  # this option should be disabled as ZFS's ARC caches
  # frequently used files in RAM by default.
  sendfile        on;

  # Don't send out partial frames; this increases throughput
  # since TCP frames are filled up before being sent out.
  tcp_nopush      on;

  tcp_nodelay on;

  # Enable gzip compression.
  gzip on;

  # Compression level (1-9).
  # 5 is a perfect compromise between size and CPU usage, offering about
  # 75% reduction for most ASCII files (almost identical to level 9).
  gzip_comp_level    5;

  # Don't compress anything that's already small and unlikely to shrink much
  # if at all (the default is 20 bytes, which is bad as that usually leads to
  # larger files after gzipping).
  gzip_min_length    256;

  # Compress data even for clients that are connecting to us via proxies,
  # identified by the "Via" header (required for CloudFront).
  gzip_proxied       any;

  # Tell proxies to cache both the gzipped and regular version of a resource
  # whenever the client's Accept-Encoding capabilities header varies;
  # Avoids the issue where a non-gzip capable client (which is extremely rare
  # today) would display gibberish if their proxy gave them the gzipped version.
  gzip_vary          on;

  # Compress all output labeled with one of the following MIME-types.
  gzip_types
    application/atom+xml
    application/javascript
    application/json
    application/ld+json
    application/manifest+json
    application/rss+xml
    application/vnd.geo+json
    application/vnd.ms-fontobject
    application/x-font-ttf
    application/x-web-app-manifest+json
    application/xhtml+xml
    application/xml
    font/opentype
    image/bmp
    image/svg+xml
    image/x-icon
    text/cache-manifest
    text/css
    text/plain
    text/vcard
    text/vnd.rim.location.xloc
    text/vtt
    text/x-component
    text/x-cross-domain-policy;
  # text/html is always compressed by gzip module

  # This should be turned on if you are going to have pre-compressed copies (.gz) of
  # static files available. If not it should be left off as it will cause extra I/O
  # for the check. It is best if you enable this in a location{} block for
  # a specific directory, or on an individual server{} level.
  # gzip_static on;


  # Определяет максимальное количество файлов, информация о которых будет содержаться в кеше
  open_file_cache max=200000 inactive=20s;

  # Определяет через какое время информация будет удалена из кеша
  open_file_cache_valid 30s;

  # Будет кешировать информацию о тех файлах, которые были использованы хотя бы 2 раза
  open_file_cache_min_uses 2;

  # Будет кешировать информацию об отсутствующих файлах
  open_file_cache_errors on;


  # Include files in the sites-enabled folder. server{} configuration files should be
  # placed in the sites-available folder, and then the configuration should be enabled
  # by creating a symlink to it in the sites-enabled folder.
  # See doc/sites-enabled.md for more info.
  include sites-enabled/*;
}