Nginx 安装与配置

Nginx:网站服务器

反向代理器: nginx不直接处理请求,nginx将请求转发给Real Server ,real server 处理过后在把结果返回给客户端;

负载均衡器:将请求分配到real server各个服务器处理;

优点:异步处理时间,支持高并发(5万),模块化的设计、具有丰富的模板库;

在centos7下相关命令:
    systemctl start nginx.service
    systemctl stop nginx.service
    systemctl reload nginx.service
    systemctl status nginx.service

  如果执行报错:

问题:使用systemctl start nginx.service启动nginx,出现Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

解决:

首先需要杀掉nginx进程

killall -9 nginx
然后启动nginx

systemctl start nginx.service
————————————————
版权声明:本文为CSDN博主「抓个霸哥」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/hupi_jiandan/article/details/89955712

centos 7 安装nginx以及nginx的目录详解

原文地址:https://www.cnblogs.com/hoganhome/p/11603440.html