我想重新启动我的节点应用,所以当我输入乘客命令重新启动它时....它告诉我有多个乘客运行实例。
我没有做的是我只有一个节点应用程序(在我配置的代码中侦听我在Passengerfile.json中设置的乘客的相同端口)我安装了乘客一次它有2个实例,然后我把它击败了一个终止apache反向代理的ssl。
我如何知道每个实例的用途以及哪个用于我的应用? 这是命令的输出:
passenger-config restart-app
似乎有多个Phusion Passenger实例正在运行。 请通过以下方式选择一个特定的:
- 实例
以下Phusion Passenger实例正在运行:
名称PID描述 -------------------------------------------------- ------------------------ xeqhHKNg 2147 nginx / 1.12.2 Phusion_Passenger / 5.1.12 lHcUe3dD 5866
nginx / 1.12.2 Phusion_Passenger / 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"
}
然后我的节点应用程序的端口是:
webserver.listen(process.env.PORT || 3001,null,function(){
debug('Express webserver configured and listening at http://localhost:' + process.env.PORT || 3001);});
我的http on centos 6 apache配置:
#Redirecting all the non secured request to be secured
Redirect permanent / https://www.example.net/
我的https(ssl)on centos 6 apache配置:
# 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