nginx 1.13 see security.limit_extensions 错误解决办法

server{
        listen       80;
        server_name  moneyslow.com;

        access_log  /data/logs/nginx/moneyslow_access.log main;
        error_log  /data/logs/nginx/moneyslow_error.log;

        index index.php index.html;

        root  /var/www/html;

        if ($request_uri ~ " ") {
                return 444;
        }
        if (!-e $request_filename) {
                rewrite ^/(.*) /index.php/$1 last;
                break;
        }

location /
{
try_files $uri $uri/ /error.html;
}

location  ~ \.(ico|js|css|gif|jpg|jpeg|png)$ {
root   /var/www/html;
}

        location ~ .*\.svn\/.* { return 405; }

        location ~ .*\.(php|php5)? {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php-fpm.sock;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param SCRIPT_NAME $fastcgi_script_name;
                fastcgi_index index.php;
                include fastcgi_params;
        }

        location ~* \.(html|shtml|htm|inc|log)$ {
                expires 1m;
        }
        location ~* \.(css|js)$ {
                expires 1m;
        }
        location ~* ^.+\.(jpg|jpeg|gif|swf|mpeg|mpg|mov|flv|asf|wmv|avi|ico)$ {
                expires 15d;
        }
        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;

}

滚动至顶部