Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 通过nginx代理express-读取正确的配置文件_Node.js_Ubuntu_Express_Nginx_Configuration - Fatal编程技术网

Node.js 通过nginx代理express-读取正确的配置文件

Node.js 通过nginx代理express-读取正确的配置文件,node.js,ubuntu,express,nginx,configuration,Node.js,Ubuntu,Express,Nginx,Configuration,我正在尝试在服务器上运行我的应用程序,但在运行Enviroment时遇到问题 我将学习以下教程: http://antrikshy.com/blog/deploy-an-expressjs-app-on-digital-ocean-complete-succinct-guide/ 我安装了node并让我的应用程序运行它,它在[IP]:3000下工作 我安装了nginx,它在[IP]上成功响应 但是我不清楚配置文件的步骤我的cond.d文件夹不包含任何.conf文件。。。我不确定我的nginx是

我正在尝试在服务器上运行我的应用程序,但在运行Enviroment时遇到问题

我将学习以下教程:

http://antrikshy.com/blog/deploy-an-expressjs-app-on-digital-ocean-complete-succinct-guide/
我安装了node并让我的应用程序运行它,它在[IP]:3000下工作

我安装了nginx,它在[IP]上成功响应

但是我不清楚配置文件的步骤我的cond.d文件夹不包含任何.conf文件。。。我不确定我的nginx是否使用了正确的配置文件。因此,无法通过[IP]访问my[IP]:3000应用程序

任何关于这个问题的想法都是受欢迎的


谢谢

管理
nginx
配置文件有各种约定,具体取决于您的特定操作系统

nginx
而言,它将从
nginx.conf
文件开始,可能是类似于
/etc/nginx/nginx.conf
的地方

在该文件中,将有
include
指令来引入其他配置文本,这允许您对服务器进行逻辑分区

可能有这样一种说法:

include /etc/nginx/conf.d/*.conf;
这意味着您可以创建与该模式匹配的任何文件,以便在主
nginx
配置文件中的该点添加配置文本。例如:
/etc/nginx/conf.d/default.conf