openresty實現lnmp的快取前移

2021-09-20 04:09:54 字數 1872 閱讀 6770

1.關閉之前的nginx

[root@server1 ~]# nginx -s stop
2.解壓openresty原始碼包

[root@server1 ~]# tar zxf openresty-1.13.6.1.tar.gz
3.搭建預編譯環境、編譯並安裝

5.修改openresty的配置檔案

[root@server1 conf]# vim nginx.conf

修改的部分:

新新增的部分:

location /memc

location ~ \.php$

6.openresty語法檢測

7.開啟openresty

[root@server1 sbin]# ./nginx
8.檢視程序

9.測試:瀏覽器訪問172.25.7.1

OpenResty實現負載均衡

2.配置openresty 2.2 進入配置目錄 2.3 修改配置檔案 3.啟動服務 4.開啟相應埠 yum install pcre devel openssl devel gcc curlwget安裝完成後缺省會在root目錄下 進入 openresty 目錄 cd openresty 1.19...

Openresty實現獲取內部location

三種方式實現獲取內部location資訊 location api1 location api2 序列實現 local t1 ngx.now local res1 ngx.location.capture api1 local res2 ngx.location.capture api2 local...

OpenResty 環境搭建

openresty 是乙個基於nginx 與lua 的高效能web 平台,其內部整合了大量精良的 lua 庫 第三方模組以及大多數的依賴項。本文是根據 openresty 官網 指南搭建openresty 服務的筆記。系統ubuntu 16.04 lts apt install libreadlin...