版本更新啦!现在安装包支持proxy_cache模块,支持密码保护目录、自定义错误页面等。并且支持wildcard泛域名解析!如果需要更新新版本的nginx前端。先卸载旧版本,再安装新版本。如果你有任何意见或建议,请与我联系。
2010-11-08 updated 此版本暂不支持cpanel 11.26以上的版本.
为cPanel主机添加nginx服务器软件,这样可以让nginx跑在前端处理静态文件,并且加装nginx后的资源消耗比单纯跑apache少很多.在找cPanel hack的资料的时候,刚好看到cPanel官方论坛上的一个牛人写的一个安装脚本,仔细拜读了一遍代码之后,决定在自己的cPanel服务器上安装.在使用过程中也渐渐发现了一些可以优化.可以增加的特性,主要是nginx上的一些新特性,籍由这些特性,完成了平时似乎不能完成的功能,例如在高并发的机器上实现的服务器端的缓存功能,以及nginx作为前端的时候使用.htaccess进行目录保护.这些特性都大大方便了我们的使用.
这里引用cPanel Forums上的帖子.作者blargman写了一个专门为cPanel打造的nginx自动安装脚本.
Evidently I don't know hot to post in the right forum.
This is an automated nginx installer for cpanel. Integrates so that domain adding/removal is all done automatically.
Some people had asked for cpanel support. In lieu of that, this does pretty much everything I can think of that they would do. It creates a vhost for each domain/addon/subdomain and serves up static content.Let me know if you have any thoughts/questions or better yet suggestions.
http://blargman.com/public.tar
以上是作者原文,原文地址:点击这里.