采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
文件上传成功后点击图片url文件打不开,检查url没错
同学,检查一下指定的文件夹中是否存在这个图片
图片存在的
同学,如果存在的话,说明你的nginx这块的静态资源代理没有成功。可以把nginx配置贴上来看看
image.imooc.com.conf配置 server { listen 80; autoindex off; server_name image.imooc.com; access_log c:/access.log combined; index index.html index.htm index.jsp index.php; #error_page 404 /404.html; if ( $query_string ~* ".*[\;'\<\>].*" ) { return 404; } location ~ /(mmall_fe|mmall_admin_fe)/dist/view/* { deny all; } location / { root C:\ftpfile\img; add_header Access-Control-Allow-Origin *; } } tomcat.imooc.com.conf配置 server { listen 80; autoindex on; server_name tomcat.imooc.com; access_log d:/access.log combined; index index.html index.htm index.jsp index.php; #error_page 404 /404.html; if ( $query_string ~* ".*[\;'\<\>].*" ){ return 404; } location / { proxy_pass http://127.0.0.1:8080; add_header Access-Control-Allow-Origin *; } } hosts 127.0.0.1 image.imooc.com 127.0.0.1 tomcat.imooc.com 127.0.0.1 img.happymmall.com
登录后可查看更多问答,登录/注册
前后端分离,数据库接口设计,架构设计,功能开发,上线运维
11.2k 10
2.3k 22
1.9k 21
2.8k 21
2.5k 18
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号