在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Linux  HTML/ 如何在服務(wù)器部署Vue項(xiàng)目?

如何在服務(wù)器部署Vue項(xiàng)目?

我根據(jù)這篇nodejs服務(wù)器部署教程一在阿里云部署前端代碼,一切都正常,但是在服務(wù)器啟動hello.js服務(wù)器后在公網(wǎng)訪問失敗。
/etc/nginx/conf.d/test-8081.conf文件配置服務(wù)器代理:

upstream hello {
    server 127.0.0.1:8081;
}

server {
    listen 80;
    server_name hello.ned.com;

    location / {
        proxy_set_header Host  $http_host;
        proxy_set_header X-Real-IP  $remote_addr;  
        proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header X-Nginx-proxy true;
        proxy_pass http://hello;
        proxy_redirect off;
    }
}

查看配置是否成功以及啟動服務(wù)器:

圖片描述

回答
編輯回答
櫻花霓

發(fā)現(xiàn)原因了,阿里云默認(rèn)只開放22端口,安全組設(shè)置端口白名單就好了,折騰了我好久。

2017年10月14日 08:24