GithubHelp home page GithubHelp logo

nginx-demo's Introduction

nginx-demo

nginx的学习笔记

参考

http://www.nginx.cn/doc/

私人技术交流QQ群:387017550,爱加不加,高冷,谢谢

0、命令行工具(MAC专享)

由于需要涉及到比较多的命令行输入,所以建议搞一个专业的命令行工具,mac自带的终端功能并不强大。

iTerm2,参考:https://www.jianshu.com/p/33f2048b8862


目录

01、安装nginx

02、默认目录

03、nginx常用命令

04、配置nginx的配置文件

05、一个nginx服务器为多个ip服务

06、一个nginx服务器为多个域名服务

07、日志

08、文件列表

09、负载均衡

10、Rewrite

xx、主进程pid

当我们需要控制 nginx 的主进程时,我们需要知道主进程的 pid

获取pid时,可以通过 nginx.pid 来获取,里面只有一个值,就是 主进程的 pid 的值;

一般他在 /usr/local/nginx/nginx.pid 中,如果你按照我的方式来安装的话,他应该在 /usr/local/var/run/nginx.pid 中。

如果需要迁移(例如 nginx.conf 里,这个文件应该在 nginx/logs 这个目录中。但在mac里,他并不是)

那么就在命令行中,先进入目标目录(如在 nginx/logs 目录下),输入以下命令移动文件:

mv /usr/local/var/run/nginx.pid ./

拿到主进程pid的意义在哪,待后续补充;

// todo 待补充

08、信号处理

这篇文章讲的比较好:

nginx介绍-信号处理

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.