在cloudfoundry上配置https 服务出现下面的问题

treedemo 2012-10-12 04:35:38
我修改 vi conf/nginx.conf如下

server {
ssl on;
ssl_certificate /secretfiles/froggy.crt;
ssl_certificate_key /secretfiles/froggy.key;

listen 443;
server_name localhost;
}
接下来执行 sbin/nginx -t 出现下面的情况
[emerg]: unknown directive "ssl" in /root/cloudfoundry/.deployments/devbox/deploy/nginx/nginx-0.8.54/conf/nginx.conf:152
configuration file /root/cloudfoundry/.deployments/devbox/deploy/nginx/nginx-0.8.54/conf/nginx.conf test failed
情大侠们帮忙看下什么情况,该如何解决?

...全文
382 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
treedemo 2012-10-15
  • 打赏
  • 举报
回复
我参考过那篇文章,这行下面的命令出现了如下问题
root@vf-v2:/usr/local/nginx# sbin/nginx -s reload
[error]: invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
我想是不是和cloudfoundry自带的nginx有关,该如何解决?
BurnabyBull 2012-10-12
  • 打赏
  • 举报
回复
参考: https://github.com/cloudfoundry-collaboration/vcap/wiki/Setup-SSL-on-cloudfoundry-landscape

主要说明部分:
The nginx server that cloudfoundry installs by default has no ssl support. In order to enable ssl support you have to download the sources and compile it with --with-http_ssl_module option. Run the following command nginx -V. This will print all compile-time options of nginx. Copy these options and recompile nginx with the same options plus the --with-http_ssl_module. Note that you need to have OpenSSL installed! Here is the complete set of steps:
1.Download the latest sources with wget http://nginx.org/download/nginx-0.7.69.tar.gz

2.Extract the archive with tar -xzf nginx-0.7.69.tar.gz

3. cd nginx-0.7.69
4.Execute nginx -V - this will show the compiletime opts of nginx. Copy these options.
5.Execute ./configure with the options from step 4 plus the extra option --with-http_ssl_module
6.Execute make

7.Execute make install

548

社区成员

发帖
与我相关
我的任务
社区描述
Cloud Foundry是业界第一个开源PaaS云平台,它支持多种框架、语言、运行时环境、云平台及应用服务,使开发人员能够在几秒钟内进行应用程序的部署和扩展,无需担心任何基础架构的问题。
社区管理员
  • Cloud Foundry社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧