



下面是我 的nginx配置文件的代码。用的是lnmp搭的
server
{
listen 80;
#listen [::]:80;
server_name yy.com ;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/yii2.com;
include yy.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
fastcgi_param PATH_INFO $fastcgi_path_info;
deny all;
}
access_log off;
}伪静态yy.conf代码如下rewrite ^(.*)$ /index.php?s=$1 last;
if (!-e $request_filename) {
break;
}下面这图是我删除了整个目录,重新解压的框架文件,直接丢个图片进去就这样一个提示出来了,为啥访问不了文件 我就郁闷了
最佳答案