简体   繁体   English

dotCloud自定义node.js服务Nginx配置

[英]dotCloud custom node.js service nginx config

I setup a custom nodejs service using the https://github.com/dotcloud/node-on-dotcloud . 我使用https://github.com/dotcloud/node-on-dotcloud设置了自定义nodejs服务。 But now it seems like it doesn't have nginx. 但是现在看来它没有nginx。 How to setup nginx for a custom nodejs service? 如何为自定义Node.js服务设置Nginx?

First, a cautionary statement: the dotCloud 'custom' service is still in beta. 首先,请注意:dotCloud“自定义”服务仍处于测试阶段。 So the answer I give you now could change in the future. 因此,我现在给您的答案将来可能会更改。

When you create a 'custom' type nodejs service, your service container also has nginx available, but it is not running. 创建“自定义”类型的nodejs服务时,您的服务容器还具有可用的nginx,但未运行。 To get nginx to run, you will need to: 要运行nginx,您需要:

  1. Add an nginx.conf file to the root of your application. 将nginx.conf文件添加到应用程序的根目录。

  2. Add a 'process' to your dotcloud.yml file to start up nginx: 在您的dotcloud.yml文件中添加一个“进程”以启动nginx:

    process: nginx -c your_configuration_file 进程:nginx -c your_configuration_file

where *your_configuration_file* is the full path to your nginx.conf 其中* your_configuration_file *是您的nginx.conf的完整路径

I hope that helps! 希望对您有所帮助!

/Andy /安迪

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM