ssh root@47.106.12.245 Yfc256631!
#!/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