Node.js 似乎有多个Phusion乘客实例正在运行
我想重新启动我的节点应用程序,所以当我键入passenger命令重新启动它时……它告诉我有多个passenger实例正在运行 我不明白的是,我只有一个节点应用程序(在代码中,我将其配置为侦听我在Passengerfile.json中设置的it passenger的同一端口),并且我安装了passenger,为什么它有两个实例,然后我将其置于ssl终止的apache反向代理之后 我如何知道每个实例的使用情况,以及哪一个用于我的应用程序? 以下是命令的输出:Node.js 似乎有多个Phusion乘客实例正在运行,node.js,apache,passenger,centos6,Node.js,Apache,Passenger,Centos6,我想重新启动我的节点应用程序,所以当我键入passenger命令重新启动它时……它告诉我有多个passenger实例正在运行 我不明白的是,我只有一个节点应用程序(在代码中,我将其配置为侦听我在Passengerfile.json中设置的it passenger的同一端口),并且我安装了passenger,为什么它有两个实例,然后我将其置于ssl终止的apache反向代理之后 我如何知道每个实例的使用情况,以及哪一个用于我的应用程序? 以下是命令的输出: passenger-config res
passenger-config restart-app
似乎有多个Phusion乘客实例正在运行。
请通过传递选择一个特定的:
--实例
以下Phusion乘客实例正在运行:
名称PID描述
--------------------------------------------------------------------------xeqhHKNg 2147 nginx/1.12.2
Phusion_乘客/5.1.12 lHcUe3dD 5866nginx/1.12.2 Phusion_乘客/5.1.12 我真的很想知道发生了什么 以下是我在Passengerfile.json中的配置:
{
// Tell Passenger that this is a Node.js app.
// Replace "app.js" with your app's entry point file.
"app_type": "node",
"address":"127.0.0.1",
"startup_file": "bot.js",
// Run the app in a production environment. The default value is "development".
"environment": "production",
// Run Passenger on the given port. In this example, we use port 80,
// the standard HTTP port.
"port": 3001,
// Tell Passenger to daemonize into the background.
"daemonize": true,
// Tell Passenger to run the app as the given user. Only has effect
// if Passenger was started with root privileges.
"user": "kaku"
}
然后我的节点应用程序的端口是:
listen(process.env.PORT | | | 3001,null,function()){
我在centos 6 apache上的http配置:
#Redirecting all the non secured request to be secured
Redirect permanent / https://www.example.net/
centos 6 apache配置上的我的https(ssl):
# Tells Apache to forward all requests for www.foo.com
# to the Passenger Standalone instance listening on port 3001.
ProxyPass / http://127.0.0.1:3001/
ProxyPassReverse / http://127.0.0.1:3001/
ProxyPreserveHost on
听起来像是一个配置问题,你应该发布更多关于设置的详细信息。我应该发布哪些详细信息?例如,你是如何安装Passenger的(有多种方法),你是如何配置的(Passengerfile.json),您是如何配置ssl终止apache代理的?您还说您将应用程序配置为使用与Passenger相同的端口,这不好,会产生冲突。
# Tells Apache to forward all requests for www.foo.com
# to the Passenger Standalone instance listening on port 3001.
ProxyPass / http://127.0.0.1:3001/
ProxyPassReverse / http://127.0.0.1:3001/
ProxyPreserveHost on