Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
nginx:资源被解释为Image,但使用MIME类型Image/scv+传输;xml:“;http://localhost/landloss/HTML5-logo.svg"._Html_Svg_Nginx - Fatal编程技术网

nginx:资源被解释为Image,但使用MIME类型Image/scv+传输;xml:“;http://localhost/landloss/HTML5-logo.svg".

nginx:资源被解释为Image,但使用MIME类型Image/scv+传输;xml:“;http://localhost/landloss/HTML5-logo.svg".,html,svg,nginx,Html,Svg,Nginx,我试图在NGINX上提供SVG文件。我的conf文件如下所示,包括SVG的类型声明: pid logs/nginx.pid; error_log logs/nginx_error.log; events { worker_connections 1024; } http { server { root /data/www; types { text/html html; image

我试图在NGINX上提供SVG文件。我的conf文件如下所示,包括SVG的类型声明:

pid logs/nginx.pid;
error_log logs/nginx_error.log;

events {     
    worker_connections  1024; 
}

http {
    server {
        root /data/www;
        types {
            text/html  html;
            image/gif  gif;
            image/jpeg jpg;
            image/scv+xml svg;
        }

        location /static{
        }
    }

}
我的HTML如下所示:

<img src="logo.svg"></img>

如何将其作为SVG托管?

SVG的正确mime类型是image/SVG+xml,我不确定您从哪里获得了scv

Resource interpreted as Image but transferred with MIME type image/scv+xml: "http://localhost/workingdir/HTML5-logo.svg".