nginx 相关命令

不同操作系统下的相关命令

widows下

命令解释
start nginx.exe启动nginx
nginx.exe -s reload重启nginx
nginx.exe -s stop/quit停止nginx
nginx.exe -s open打开日志文件
nginx -v查看nginx版本

linux 下

命令解释
./nginx.exe启动nginx
nginx.exe -s reload重启nginx
nginx.exe -s stop/quit停止nginx
nginx.exe -s open打开日志文件
nginx -v查看nginx版本

config 配置

属性名字解释
listen启动时的监听端口,就是启动端口
server_nameniginx启动后请求的路径
proxy_pass代理服务器地址;使用:location /a/ { proxy_pass http://localhost/; # 请求 /a/b/c ;代理后 http://localhost/b/c.如果 proxy_pass http://localhost; 就是结尾没有 ‘/’ 那么他的结果就是 http://localhost/a/b/c }
proxy_redirect默认值 default (可选值 off ,redirect replacement)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值