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 + 指向域名

访问 域名 + 配置后的文件路径

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值