Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将项目放在阿里云centos上访问不到。 #483

Open
llh1187 opened this issue Dec 23, 2019 · 2 comments
Open

将项目放在阿里云centos上访问不到。 #483

llh1187 opened this issue Dec 23, 2019 · 2 comments

Comments

@llh1187
Copy link

llh1187 commented Dec 23, 2019

参照把项目部署到UCloud以及阿里云的ubuntu上的办法,首先git clone 项目下来,然后npm install之后,

修改 config/production.js,将 port 修改为 80 端口:

我开放的是8888端口,所以修改为如下:

module.exports = {
  port: 8888,
  mongodb: 'mongodb://myblog:myblog@ds139327.mlab.com:39327/myblog'
}

然后我自己百度了一下怎么安装mogodb,安装好了之后,进行安全管理,增加用户权限认证,然后安装了pm2。然后再运行npm start,发现pm2运行起来了,但是网页无法访问,我用的是 公网ip:8888/posts 的方式访问,请问有大佬可以帮忙看下吗?

@FishWaitingCat
Copy link

阿里云防火墙端口配置了嘛

@llh1187
Copy link
Author

llh1187 commented Dec 23, 2019

阿里云防火墙端口配置了嘛

配置了8888,但是下面的这一行,39327就没有配置。

mongodb: 'mongodb://myblog:myblog@ds139327.mlab.com:39327/myblog'
不知道是干什么用的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants