Nginx源码编译安装
2016-07-27 17:03
537 查看
系统版本 centos7.0
nginx版本 nginx1.8.0
tar zxf nginx-1.8.0.tar.gz cd nginx-1.8.0/ vim auto/cc/gcc 注释debug 可以减小安装后的大小 vim src/core/nginx.h 隐藏nginx版本信息 #解决软件包依赖性 yum install -y pcre-devle yum install -y openssl-devel ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module #编译 --with-http_ssl_module 开启HTTP SSL模块 支持https请求 make make install
以下操作是给nginx一个安全认证的key,就可以开始使用
cd /etc/pki/tls/certs/ make nginx.pem ##建立安全认证文件,在其中填写信息 mv nginx.pem /usr/local/nginx/conf/
编辑配置文件
vim /usr/local/lnmp/nginx/conf/nginx.conf server { 117 listen 443 ssl; 118 server_name localhost; 119 120 ssl_certificate nginx.pem; 121 ssl_certificate_key nginx.pem; 122 123 ssl_session_cache shared:SSL:1m; 124 ssl_session_timeout 5m; 125 126 ssl_ciphers HIGH:!aNULL:!MD5; 127 ssl_prefer_server_ciphers on; 128 129 location / { 130 root html; 131 index index.php index.html index.htm; 132 } 133 }
开启服务
nginx
相关文章推荐
- 正向代理服务器暴露访问者ip的选项
- nginx基本配置与参数
- nginx配置location总结及rewrite规则写法
- nginx 改变标题 ngx_setproctitle
- Nginx + Lua
- **NGINX简单access日志查询分析**
- 处理一起IIS的FastCGI解析漏洞
- Nginx Location语法规则
- nginx日志文件格式转换
- CentOS安装nginx
- 怎样配置让apache访问日志记录真实客户端IP,而不是nginx代理服务器IP
- php7 nginx 配置
- NGINX 进程通信机制
- 解决nginx负载均衡的session共享问题
- Nginx负载均衡的4种方案配置实例
- 分布式架构高可用架构篇_04_Keepalived+Nginx实现高可用Web负载均衡
- 通过Nginx部署Django
- logrotete分割nginx日志
- Nginx+Keepalived实现站点高可用
- 简单编译安装NGINX