entngx架构.md 1.5 KB

entngx项目

复刻用例

ssh root@47.106.12.245 Yfc256631!

  1. 阿里云 ubuntu18.04 x86_64
  2. 安装配置教程http://openresty.org/cn/getting-started.html

一些笔记

#!/bin/sh
/usr/local/openresty/nginx/sbin/nginx  -c /root/about_nginx/work/conf/nginx.conf
#启动是work目录下的nginx.conf文件
#教程:http://openresty.org/cn/getting-started.html
#PATH的设置
#export PATH=/usr/local/openresty/nginx/sbin:$PATH
openresty已经搭建,具体参考 http://openresty.org/cn/linux-packages.html#ubuntu | http://openresty.org/cn/installation.html
nginx的默认目录是/usr/local/openresty/nginx
这里配置了work测试目录。教程链接http://openresty.org/cn/getting-started.html

killall nginx #杀死所有nginx进程

netstat -tlnp #查看网络状态

ps -ef|grep nginx #查看nginx有关进程

创建的.sh文件,是用于指定启动nginx.conf配置文件

/usr/local/openresty/bin/resty test.lua 指定运行文件

/usr/local/openresty/nginx/conf/?.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/site/lualib/?.lua;;
#默认lua包位置
/usr/local/openresty/lualib/?.so;/usr/local/openresty/nginx/lua/lib/lua/5.1/?.so;;
#可能是nginx的包位置,openresty没有

#运行test.lua
/usr/local/openresty/bin/resty test.lua

lua的库可以是.lua,也可以是.so

一些坑

  1. nginx 配好了,外网ip无法访问。 解决方案:阿里云安全组怎么开放全部端口