标签:
linux版本:CentOS 6.0+
安装nginx方法:
1、下载nginx rpm包命令:
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
2、安装nginx rpm包:
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
3、使用yum安装nginx:
yum install nginx
4、启动nginx命令:
nginx
关闭nginx命令:
nginx -s stop
Nginx安装路径:
whereis nginx nginx: /usr/sbin/nginx /etc/nginx /usr/share/nginx 1) 配置所在目录:/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
nginx默认配置文件在: /etc/nginx/conf.d/default.conf
标签:
原文地址:http://www.cnblogs.com/HD/p/4689591.html