请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

正在回答 回答被采纳积分+3

2回答

geelylucky 2020-04-17 21:03:26

同学,你这个路径下有timg.jpg图片吗:E:\dswz\ftpfile\img

http://127.0.0.1:8080能访问到嘛?

1 回复 有任何疑惑可以回复我~
geelylucky 2020-04-16 22:53:35

同学,你把配置贴上来看看

1 回复 有任何疑惑可以回复我~
  • server {
    
        listen 80;
    
        autoindex on;
    
        server_name image.imooc.com;
    
        access_log e:/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 E:\dswz\ftpfile\img;
    
            add_header Access-Control-Allow-Origin *;
    
        }
    
    }
    
    
    
    tomcat的:
    
    server {
    
        listen 80;
    
        autoindex on;
    
        server_name tomcat.imooc.com;
    
        access_log e:/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也配置了
      include vhost/*.conf;这个也加了
    回复 有任何疑惑可以回复我~ 2020-04-17 10:08:17
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号