nginx 服务配置,nginx配置
nginx 服务配置,nginx配置
SSH工具:SecureCRT
配置文件路径:/usr/local/nginx/conf/nginx.conf
nginx 启动路径:/usr/local/nginx/sbin/
nginx log 路径:/usr/local/nginx/logs/
替换nginx.conf 文件之后 运行 “ ./nginx -t ” 命令验证 nginx 配置文件是否正确
返回 nginx.conf syntax is ok nginx.conf test is successful 说明配置文件正确
输入命令 “ ./nginx ” 启动服务
“ ./nginx -s reload ” 重新启动
“ tail -50 error.log ” 显示最近 50条 log
“ netstat -pntl ” 查看进程占用端口状况
host配置 服务器ip + 指向域名
访问 域名 + 配置后的文件路径
评论暂时关闭