![nginx 找不到 phpMyAdmin](https://linux22.com/image/769862/nginx%20%E6%89%BE%E4%B8%8D%E5%88%B0%20phpMyAdmin.png)
nginx 正在错误的位置搜索 phpMyAdmin
我的 nginx 配置:
server {
listen 80;
listen [::]:80;
access_log /var/log/nginx/reverse-access.log;
error_log /var/log/nginx/reverse-error.log;
root /var/www/MY_DOMAIN/html;
index index.html index.html index.php;
server_name MY_DOMAIN www.MY_DOMAIN.com;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location /APP_LOCATION {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
我建立了从 /usr/share/phpmyadmin 到 /var/www/MY_DOMAIN/html/phpmyadmin 的符号链接。
但 nginx 仍在寻找 phpMyAdmin 的默认位置
错误日志:
2021/08/27 13:24:41 [error] 1114474#1114474: *2 "/usr/share/nginx/html/phpmyadmin/index.html" is not found (2: No such file or directory), client: xxx.xx.x.xxx, server: , request: "GET /phpmyadmin/ HTTP/1.1", host: "MY_DOMAIN.com"