【发布时间】:2016-06-01 20:22:14
【问题描述】:
这是我的服务器块
server {
listen 80;
server_name domain.tld;
root /var/www/domain.tld/html;
index index.php index.html index.htm;
location / {
}
location /phpmyadmin {
alias /var/www/phpmyadmin;
}
location /nginx_status {
stub_status on;
access_log off;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
浏览http://domain.tld/index.php 工作正常,我遇到的唯一问题是浏览http://domain.tld/phpmyadmin/。它返回 404 但文件夹 /var/www/phpmyadmin 存在于服务器上。查看 /var/log/nginx/error.log,那里没有记录错误,但对它的访问记录在 /var/log/nginx/access.log 中。这可能是什么问题?
【问题讨论】:
标签: nginx