M
M
Makssof2020-06-28 17:55:16
PHP
Makssof, 2020-06-28 17:55:16

Nginx + PHP-fpm: Access to the script has been denied?

Php-fpm says access denied, why? All permissions are 777, all user groups are www-data:www-data, there is an index.php file, the path is correct

config
server{
  listen 80;
  add_header x-dbg-80 1;

  # logging
  access_log /home/www-data/backend/logs/vk.access.log;
  error_log /home/www-data/backend/logs/vk.error.log warn;

  location /vk/callback {
    add_header x-dbg-80 2;

    alias /home/www-data/backend;
    index index.php;
    try_files $uri $uri/ /index.php?$args =404;

    # fastcgi settings
    include fastcgi_params;
    fastcgi_pass			       unix:/var/run/php/php7.4-fpm.sock;
    fastcgi_index			       index.php;
    fastcgi_buffers			       8 16k;
    fastcgi_buffer_size		       32k;
    fastcgi_split_path_info        ^(.+\.php)(/.+)$;
    fastcgi_param                  SCRIPT_FILENAME                    $request_filename;
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
monday_suicide, 2020-06-28
@dcc

Check who is running Ngnx
Check who is the owner and who can read the file execute index.php
Maybe this is the problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question