Nginx返回404未找到

时间:2014-07-17 18:44:14

标签: nginx

    server {
        listen   80; ## listen for ipv4; this line is default and implied
        location /phpmyadmin {
            root /var/www/;
            index index.php index.html index.htm;
        }

            location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
                    expires max;
                    log_not_found off;
            }

            location ~* \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                include /etc/nginx/fastcgi_params;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
            }    
}

如果我去/ phpmyadmin,我会得到一个404页面。怎么解决?在/ var / www文件夹中存在文件index.html。

提前致谢。

0 个答案:

没有答案