更新(2013 年 11 月 19 日):修改了 nginx 1.4.3 的脚本(不需要 spdy 补丁)
https://gist.github.com/deepak-kumar/7541199#file-compile_nginx_1-4-3_with-spdy-sh https://gist.github.com/deepak-kumar/7541199#file-compile_nginx_1-4-3_with-spdy-sh
我为设置编写了 Shell 脚本
https://gist.github.com/deepak-kumar/5069550#file-compile_nginx_with_spdy-sh https://gist.github.com/deepak-kumar/5069550#file-compile_nginx_with_spdy-sh
我已经找到了问题的解决方案。
在编译导致问题的 1.3.13 之前,我已经在 ubuntu 12.04 上安装了 nginx 软件包。$ sudo apt-get install nginx
为了解决这个问题,我确保 /etc/init.d/nginx 应使用正确的二进制文件。
我在终端上做了以下操作:
$ which nginx
$ /usr/local/sbin/nginx
检查了我现有的/etc/init.d/nginx
使用错误的脚本DAEMON
路径,所以我将其更改为如下所示(有效)
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/sbin/nginx # $which nginx
之前的上述值是(不起作用)
#PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#DAEMON=/usr/sbin/nginx
文件的其余部分保持不变。所以基本上我使用了正确版本的二进制文件。
更新:如果你们感兴趣的话,这个博客也是一个非常好的参考点。http://blog.bubbleideas.com/2012/08/How-to-set-up-SPDY-on-nginx-for-your-rails-app-and-test-it.html http://blog.bubbleideas.com/2012/08/How-to-set-up-SPDY-on-nginx-for-your-rails-app-and-test-it.html