为MEAN堆栈配置nginx

时间:2016-03-30 02:43:28

标签: nginx mean-stack

我听说MEAN堆栈如果由于某些原因在前面有nginx并且遵循已经完成它的某些人的指示,那将是有益的。我通过Bitnami和AWS安装了MEAN堆栈,并尝试设置nginx配置。我正在修改包含此代码的文件/ usr / share / nginx / default。

server {
listen 80;

server_name example.com www.example.com;

location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}

我的问题是,我是否应该使用我的地址而不是127.0.0.1? 我应该保持3000并更改我的AWS端口设置吗?提前谢谢!

1 个答案:

答案 0 :(得分:0)

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier("Cell") as! CategoryRow cell.collectionView.delegate = cell return cell } 是服务器的环回IP地址,所以答案是否定的,你必须保留该IP地址。

端口127.0.0.1是一个应用程序端口,表示您的应用程序正在侦听该端口。通常,您可以检查app.js或server.js文件中的端口号。您可以更改属于您已设置应用程序端口正在侦听的端口的端口。抱歉我的英语不好。

相关问题