请稍等 ...
×

采纳答案成功!

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

项目部署linux后 ,在浏览器上访问不到项目

https://img1.sycdn.imooc.com//szimg/5afc401e000172ec13940352.jpg ECS 只买了一个月 ,没有进行备案,执行sh完毕 ,tomcat 、nginx 都启动了 ,检查nginx conf 和tomcat server.xml 配置没有问题,在浏览器上输入ip 访问不到项目 

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

插入代码

2回答

Geely 2018-05-19 19:10:28

你好,同学 你的nginx配置是什么呢,servername代表要进行转发的入口,你的servername现在配置可以转发ip么?

0 回复 有任何疑惑可以回复我~
polo哦 2018-05-17 14:42:51

你是nginx跳转到8080端口么

0 回复 有任何疑惑可以回复我~
  • 提问者 慕无忌0387022 #1
    server {
    listen 80;
    autoindex on;
    server_name 39.106.17.164 oecoo.com www.oecoo.com;
    access_log /usr/local/nginx/logs/access.log combined;
    index index.html index.htm index.jsp index.php;
    if ( $query_string ~* ".*[\;'\<\>].*" ){
            return 404;
            }
    
    location = / {
            root /product/front/mmall_fe/dist/view;
            index index.html;
    }
    
    location ~ .*\.html$ {
            root /product/front/mmall_fe/dist/view;
            index index.html;
    }
    
    location / {
            proxy_pass http://127.0.0.1:8080/;
            }
    
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
            proxy_pass http://127.0.0.1:8080;
            expires 30d;
            }
    
    location ~ .*\.(js|css)?$ {
            proxy_pass http://127.0.0.1:8080;
            expires 7d;
            }
    }
    回复 有任何疑惑可以回复我~ 2018-05-19 20:16:48
  • 提问者 慕无忌0387022 #2
    我的域名还没有备案,是不是这个原因呢
    回复 有任何疑惑可以回复我~ 2018-05-19 20:17:29
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

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

帮助反馈 APP下载

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

公众号

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