Установил nginx и php-fpm 7.4 с нуля. Установил phpmyadmin при переходе получаю ошибку:
No input file specified.
server
{
listen 80;
server_name rmp.domain.ru www.rmp.domain.ru;
root /var/www/rmp.domain.ru;
return 301 https://rmp.domain.ru$request_uri;
}
server
{
listen 443 ssl;
server_name rmp.domain.ru www.rmp.domain.ru;
# SSL support
ssl_certificate /etc/letsencrypt/live/rmp.domain.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/rmp.domain.ru/privkey.pem;
charset utf-8;
root /var/www/rmp.domain.ru/public;
index index.php index.html index.htm;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
# Static content
location ~* ^.+.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|mp3|bmp|flv|rtf|js|swf|iso)$
{
root /var/www/rmp.domain.ru;
expires 1d;
}
location ~ \.php$
{
include fastcgi.conf;
fastcgi_intercept_errors on;
try_files $uri =404;
fastcgi_pass unix://var/run/php/rmp.domain.ru.sock;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass unix://var/run/php/rmp.domain.ru.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /
{
try_files $uri $uri/ /index.php?q=$uri$args;
}
}
Уже всю голову сломал. php прекрасно работает. Пробовал создать символическую ссылку на каталог пхпмайадмин - тоже самое.
В логе есть ошибка:
FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open_basedir restriction in effect. File(/usr/share/phpmyadmin/index.php) is not within the allowed path(s): (/var/www/rmp.domain.ru/) in Unknown on line 0PHP message: PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0Unable to open primary script: /var/www/rmp.domain.ru/phpmyadmin/index.php (Operation not permitted)" while reading response header from upstream, client: 82.208.99.0, server: rmp.domain.ru, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix://var/run/php/rmp.domain.ru.sock:", host: "rmp.domain.ru"
Как побороть?