This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
但是默认在Ubuntu13.04下安装得到的Nginx版本居然是1.2.x,太低了。 | |
下面描述如何获取最新的安装包: | |
1.添加key | |
wget http://nginx.org/keys/nginx_signing.key | |
apt-key add nginx_signing.key | |
2.创建/etc/apt/sources.list.d/nginx.list文件,内容如下: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. | |
#运行用户 | |
user www-data; | |
#启动进程,通常设置成和cpu的数量相等 | |
worker_processes 1; | |
#全局错误日志及PID文件 | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; |