我使用 nginx 在 Debian Stretch 上安装了 phpmyadmin,但是在导航到http://blah.com/phpmyadmin时得到 404 ,日志中没有错误。这是我的默认文件
vi /etc/nginx/sites-available/default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
location /phpmyadmin/ {
alias /usr/share/phpmyadmin/;
index index.html index.htm index.php;
location ~ ^/pmadmin(.+\.php)$ {
alias /usr/share/phpmyadmin$1;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$1;
include fastcgi_params;
fastcgi_intercept_errors on;
}
}
我错过了什么?