centos nginx的安装

小豆苗 1年前 ⋅ 894 阅读

安装nginx
1. 安装
yum install nginx
2.查看安装路径
whereis nginx
3. 默认路径
(1) Nginx配置路径:/etc/nginx/
(2) PID目录:/var/run/nginx.pid
(3) 错误日志:/var/log/nginx/error.log
(4) 访问日志:/var/log/nginx/access.log
(5) 默认站点目录:/usr/share/nginx/html

# 设置自动启动
systemctl enable nginx

# 启动nginx
systemctl start nginx

# 检查配置是否正确
cd /usr/sbin
nginx.conf test is successful

# 重启
cd /usr/sbin
nginx -s reload


全部评论: 0

    我有话说: