Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Orange- API Gateway (Gateway) based on nginx/openresty

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Introduction to Orange

Orange is an OpenResty-based API gateway. In addition to the basic functions of Nginx, it can also be used for API monitoring, access control (authentication, WAF), traffic filtering, access speed limit, AB testing, dynamic diversion and so on. It has the following characteristics:

Provides a set of default Dashboard for dynamic management of various functions and configurations and provides API interfaces for implementing third-party services (such as personalized operation and maintenance requirements, (third party dashboard, etc.) Custom plug-ins can be written according to the specification to extend the Orange function Orange actual combat environment [root@orange ~] # cat / etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@orange ~] # uname-aLinux orange 3.10.0-693.17.1.el7.x86_64 # 1 SMP Thu Jan 25 20:13:58 UTC 2018 x86'64 GNU/Linux [root@orange ~] # iptables-F [root@ Orange ~] # ip addr [root@orange orange] # ip addr1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00 scope host valid_lft forever preferred_lft forever2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 000c : 29:57:b5:ab brd ff:ff:ff:ff:ff:ff inet 192.168.0.131 Plus 24 brd 192.168.0.255 scope global dynamic eth0 valid_lft 7081sec preferred_lft 7081sec inet6 fe80::3f87:b30b:ff6b:e675/64 scope link valid_lft forever preferred_lft foreverOpenResty download [version > 1.9.7.3] download OpenResty source package [root@orange ~] # cd / usr/local/src/ [root@orange Src] # wget https://openresty.org/download/openresty-1.13.6.1.tar.gz--2018-03-06 15 src 41 1 src 59 https://openresty.org/download/openresty-1.13.6.1.tar.gzResolving openresty.org (openresty.org). 120.26.162.249Connecting to openresty.org (openresty.org) | 120.26.162.249 |: 443. Connected.HTTP request sent, awaiting response... 200 OKLength: 4581699 (4.4m) [application/x-gzip] Saving to: 'openresty-1.13.6.1.tar.gz'100% [= >] 4581699 9.08MB/s in 0.5s 2018-03-06 15:42:00 (9.08MB/s) -' openresty-1.13.6.1.tar.gz' saved [4581699On4581699] decompress the source code package and enter the package [root@orange src] # tar xf openresty-1.13 .6.1.tar.gz [root@orange src] # cd openresty-1.13.6.1 create openresty system user [root@orange openresty-1.13.6.1] # useradd-r-s / sbin/nologin-M openresty installation dependent on [root@orange openresty-1.13.6.1] # yum install pcre pcre-devel openssl openssl-devel git-y to generate Makefile file [root@orange openresty-1.13.6.1] #. / Configure-- prefix=/usr/local/openresty-1.13.6.1-- user=openresty-- group=openresty-- with-http_stub_status_module... Configuration summary using system PCRE library + using system OpenSSL library + using system zlib library nginx path prefix: "/ usr/local/openresty-1.13.6.1/nginx" nginx binary file: "/ usr/local/openresty-1.13.6.1/nginx/sbin/nginx" nginx modules path: "/ usr/local/openresty-1.13.6.1/nginx/modules" nginx configuration prefix: "/ usr/local/openresty-1.13.6.1/nginx/conf" Nginx configuration file: "/ usr/local/openresty-1.13.6.1/nginx/conf/nginx.conf" nginx pid file: "/ usr/local/openresty-1.13.6.1/nginx/logs/nginx.pid" nginx error log file: "/ usr/local/openresty-1.13.6.1/nginx/logs/error.log" nginx http access log file: "/ usr/local/openresty-1.13.6.1/nginx/logs/access .log "nginx http client request body temporary files:" client_body_temp "nginx http proxy temporary files:" proxy_temp "nginx http fastcgi temporary files:" fastcgi_temp "nginx http uwsgi temporary files:" uwsgi_temp "nginx http scgi temporary files:" scgi_temp "cd.. /.. Type the following commands to build and install: gmake gmake installgmake compilation [root@orange openresty-1.13.6.1] # gmake... Sed-e "s |% PREFIX%% | / usr/local/openresty-1.13.6.1/nginx |"\-e "s |% PID_PATH%% | / usr/local/openresty-1.13.6.1/nginx/logs/nginx.pid |"\-e "s |% CONF_PATH%% | / usr/local/openresty-1.13.6.1/nginx/conf/nginx.conf |"\-e "s |% ERROR_LOG_ PATH%% | / usr/local/openresty-1.13.6.1/nginx/logs/error.log | "\

< docs/man/nginx.8 >

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report