nginx完整安装

发现越来越多的站点都在用nginx,并且从相关的搜索指数来看,已经超过了lighttpd,最近发现能学的东西太多了,不想学的太多,想好好了解一下nginx。

任何东西学都是从用开始的,要用当然得从安装开始。

安装包

1、nginx-1.0.13 

2、pcre 8.01

3、headers-more-nginx-module


[编译参数]

./configure \
    --prefix=/home/robertaqi/lnmp/nginx\
    --with-pcre=/home/robertaqi/download/pcre-8.01 \
    --http-log-path=/home/robertaqi/lnmp/nginx/logs/access_log \
    --error-log-path=/home/robertaqi/lnmp/nginx/logs/error_log \
    --with-http_realip_module \
    --with-http_stub_status_module \
    --without-http_userid_module \
    --http-client-body-temp-path=/home/robertaqi/lnmp/nginx/cache/client_body \
    --http-proxy-temp-path=/home/robertaqi/lnmp/nginx/cache/proxy\
    --http-fastcgi-temp-path=/home/robertaqi/lnmp/nginx/cache/fastcgi \
    --http-uwsgi-temp-path=/home/robertaqi/lnmp/nginx/cache/uwsgi \
    --http-scgi-temp-path=/home/robertaqi/lnmp/nginx/cache/scgi \
    --add-module=/home/robertaqi/download/headers-more-nginx-module \


【设置别名】
在server节点中添加
 server_tokens off;
 more_set_headers 'Server:apache';


【不用root方式启动nginx】
limit -n 1024 nginx/sbin


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值