centos安装 nginx


配置

  1. 安装 yum install nginx

  2. vim /etc/nginx/nginx.conf

  3. 检查错误 nginx -t or cd cd /usr/local/sbin;nginx -t

    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful

    表示nginx配置正确

  4. 重启nginx:nginx -s reload


Author: Acaibird
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source Acaibird !
  TOC