Nginx Essential

Post on 16-Apr-2017

407 views 1 download

Transcript of Nginx Essential

Nginx Essential

@dylanninin

Agenda

• Concepts• Introduction• Survive• HTTP module• Debug• Dev• UseCases

Concepts

Web Server

https://ruslanspivak.com/lsbaws-part1/

Web Server

https://ruslanspivak.com/lsbaws-part1/

Protocol: HTTP

https://ruslanspivak.com/lsbaws-part1/

Protocol: HTTP

Introduction

Web Server

https://w3techs.com/technologies/overview/web_server/all

Web Server

https://w3techs.com/technologies/cross/web_server/ranking

Nginx

https://www.nginx.com/blog/owen-garrett-keynote-nginx-conf-2016/

Nginx

Features

https://www.linkedin.com/pulse/nginx-web-server-its-features-webserver-ajit-punchhi

Architecture

http://www.aosabook.org/en/nginx.html

Modules

http://www.programering.com/a/MTOxUDMwATE.html

Survive

Installation

https://nginx.org/en/docs/configure.html

Layout

Configuration

http://www.nginxguts.com/2011/02/http-modules/

Configuration

/path/to/nginx

Log

HTTP Module

Generic Process Flow

Server Select

Server Select

www.slideshare.net/joshzhu/nginx-internals

Request Process Phases

Location Match

Location Match

URI Rewrite

URI Rewrite

Filter

http://www.slideshare.net/joshzhu/nginx-internals

Upstream

Load Balance

https://www.packtpub.com/networking-and-servers/nginx-essentials

Load Balance

https://www.packtpub.com/networking-and-servers/nginx-essentials

SSL

https://hpbn.co/transport-layer-security-tls/

Debug

Log

Debug Mode

http://nginx.org/en/docs/debugging_log.html

Live in production

http://agentzh.org/misc/slides/qcon-beijing-2015/application-of-lua-in-nginx.pdf

Live in production

Dev

Customize

tengine.taobao.org/book/index.html

Tengine

http://tengine.taobao.org

OpenResty

http://openresty.org

UseCases

apollo#70: proxy_pass cycle issue

jk: auth_basic

Download links

Q & A

Reference

• https://nginx.org/ • https://ruslanspivak.com/lsbaws-part1/ • https://www.nginx.com/blog/owen-garrett-keynote-nginx-conf-2016/ • http://www.aosabook.org/en/nginx.html • http://www.slideshare.net/joshzhu/nginx-internals • https://hpbn.co/transport-layer-security-tls/ • http://tengine.taobao.org/book/index.html • http://openresty.org • http://tengine.taobao.org • https://www.nginx.com/resources/wiki/modules/ • http://www.evanmiller.org/nginx-modules-guide.html • Source conf/scripts in these slides