安装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
注意:本文归作者所有,未经作者允许,不得转载
原文地址: http://blog.wsmee.com/post/136
版权声明:非商用-非衍生-保持署名| Creative Commons BY-NC-ND 3.0