• Phpmyadmin. Ошибка “File not found” (php-fpm)?

    @viktortokarev882 Автор вопроса
    Arik, Дефолтный, только и SCRIPT_FILENAME перенес сюда же

    fastcgi_param SCRIPT_FILENAME   $document_root$fastcgi_script_name;
    
    fastcgi_param QUERY_STRING      $query_string;
    fastcgi_param REQUEST_METHOD    $request_method;
    fastcgi_param CONTENT_TYPE      $content_type;
    fastcgi_param CONTENT_LENGTH    $content_length;
    
    fastcgi_param SCRIPT_NAME       $fastcgi_script_name;
    fastcgi_param REQUEST_URI       $request_uri;
    fastcgi_param DOCUMENT_URI      $document_uri;
    fastcgi_param DOCUMENT_ROOT     $document_root;
    fastcgi_param SERVER_PROTOCOL   $server_protocol;
    fastcgi_param REQUEST_SCHEME    $scheme;
    fastcgi_param HTTPS             $https if_not_empty;
    
    fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    fastcgi_param SERVER_SOFTWARE   nginx/$nginx_version;
    
    fastcgi_param REMOTE_ADDR       $remote_addr;
    fastcgi_param REMOTE_PORT       $remote_port;
    fastcgi_param SERVER_ADDR       $server_addr;
    fastcgi_param SERVER_PORT       $server_port;
    fastcgi_param SERVER_NAME       $server_name;
    
    # PHP only, required if PHP was built with --enable-force-cgi-redirect
    fastcgi_param REDIRECT_STATUS   200;
  • Phpmyadmin. Ошибка “File not found” (php-fpm)?

    @viktortokarev882 Автор вопроса
    Arik,

    conf.d/default.conf
    server {
    	listen 80 default_server;
    
    	location /.well-known {
    		root /usr/share/nginx/tmp_cert;
    	}
    
    	location / {
    		return 301 https://$host$request_uri;
    	}
    }
    
    server {
    	listen      443 ssl default_server;
    	server_name example.com;
    
    	ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    	ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    
    	root /usr/share/nginx/localhost;
    
    	location / {
    		try_files $uri /index.php;
    	}
    
    	location ~ \.php$ {
    		fastcgi_pass unix:/var/run/php-fpm.sock;
    		include      fastcgi_params;
    	}
    }
    
    server {
    	listen      443 ssl;
    	server_name sql.example.com;
    
    	ssl_certificate     /etc/letsencrypt/live/sql.example.com/fullchain.pem;
    	ssl_certificate_key /etc/letsencrypt/live/sql.example.com/privkey.pem;
    
    	client_max_body_size 50m;
    	fastcgi_read_timeout 500s;
    
    	root /usr/share/nginx/phpmyadmin;
    
    	location / {
    		try_files $uri /index.php;
    	}
    
    	location ~ \.php$ {
    		fastcgi_pass unix:/var/run/php-fpm.sock;
    		include      fastcgi_params;
    	}
    }


    nginx.conf
    user nginx;
    worker_processes 2;
    
    error_log /var/log/nginx/error.log warn;
    pid       /var/run/nginx.pid;
    
    events {
    	worker_connections 1024;
    	multi_accept on;
    }
    
    http {
    	include      /etc/nginx/mime.types;
    	default_type application/octet-stream;
    
    	log_format main '[$time_local] | $host - "$request" | $remote_addr - $remote_user '
    									'$status $body_bytes_sent "$http_referer" '
    									'"$http_user_agent" "$http_x_forwarded_for"';
    
    	access_log /var/log/nginx/access.log main;
    
    	include /etc/nginx/conf.d/*.conf;
    }
  • Frewalld. Проблемы с ограничением IP (mysql)?

    @viktortokarev882 Автор вопроса
    Спасибо, помогли!