服务器:阿里云ECS 系统版本:CentOS Linux release 8.2.2004 (Core)
nginx-1.19.3.tar.gz
configure完成之后,会有如下信息,诸如日志文件,配置文件等
检测nginx的配置是否正确
[root@iZm5e0ruj2b7jdo68j6u4nZ local]# ./nginx/sbin/nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful如果出现上面两句话,说明nginx配置ok, 可以启动。
[root@iZm5e0ruj2b7jdo68j6u4nZ local]# ./nginx/sbin/nginx没有日志输出 ,说明启动正常。
查看nginx进程
[root@iZm5e0ruj2b7jdo68j6u4nZ local]# ps -ef | grep nginx默认端口就是80,所以可以直接输入ip访问
访问nginx成功!