Acesso phpmyadmin negado, Nginx + php5.6

0

Configurei meu novo aplicativo php 5.6 em um novo servidor Ubuntu 16.04, usando Nginx 1.10, php5.6-fpm,

Quando eu tentei configurar o phpmyadmin para abri-lo usando o URL do meu aplicativo " link ", ele diz Acesso negado, com o seguinte erro em meu log nginx:

2017/05/31 12:39:37 [error] 30267#30267: *9 FastCGI sent in stderr: "Access to the script '/var/www/html' has been denied (see security.limit_extensions)" while reading response header from upstream, client: xxx.xxx.xxx.xx, server: myapp.com, request: "GET /pm HTTP/1.1", upstream: "fastcgi://unix:/run/php/php5.6-fpm.sock:", host: "myapp.com"

Minha configuração vhost é:

server {
    listen 80;
    server_name myapp.com;
    index index.php index.html index.htm;
    root /var/www/myapp/;
    access_log /var/log/nginx/myapp_access.log;
    error_log /var/log/nginx/myapp_error.log;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location /pm {
        root /var/www/html;
        index index.php;
        try_files $uri $uri/ =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php5.6-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        }


    location ~ \.php {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param SCRIPT_NAME $fastcgi_script_name;
        fastcgi_index index.php;
        fastcgi_pass unix:/run/php/php5.6-fpm.sock;
        fastcgi_read_timeout 18000;
    }
}

E o caminho do phpmyadmin é:

ls -l /var/www/html/
total 4
-rw-r--r-- 1 www-data www-data 612 May 24 17:46 index.nginx-debian.html
lrwxrwxrwx 1 www-data www-data  22 May 25 17:01 pm -> /usr/share/phpmyadmin/

Alguma ajuda, por favor?

    
por MohammedSimba 31.05.2017 / 14:52

1 resposta

0

% bl0ck_qu0te%

( Fonte )

    
por Tomasz 31.05.2017 / 15:53