标签:nginx
1.nginx 安装
(1)解压文件
(2)创建用户
(3)修改配置文件
vim /root/nginx-1.12.0/src/core/nginx.h
vim /root/nginx-1.12.0/auto/cc/gcc
(4)安装所需的库
(5)安装
(6)make && make install
(7)安装成功
测试
2.nginx 进程数设置 并发处理最大连接数设置
vim /usr/local/lnmp/nginx/conf/nginx.conf
vim /etc/security/limits.conf
3.nginx的http服务
vim /usr/local/lnmp/nginx/conf/nginx.conf
测试
4..nginx的https服务
(1)vim /usr/local/lnm.nginx的https服务
vim /etc/locla/lnmp/nginx/conf/nginx.conf
(2)生成数字证书
make cert.pem
mv cert.pem /usr/local/lnmp/nginx/conf/
测试
5.nginx status监控
vim /usr/local/lnmp/nginx/conf/nginx.conf
allow 127.0.0.1; 只允许本机访问
Deny all;
测试
6.nginx网页重写
vim /usr/local/lnmp/nginx/conf/nginx.conf
rewrite ^(.*)$ https://www.westos.org$1 permanent; 永久重写
测试
7.nginx负载均衡,轮询
vim /usr/local/lnmp/nginx/conf/nginx.conf
测试
标签:nginx
原文地址:http://12774035.blog.51cto.com/12764035/1951039