更新时间:2022-12-04 08:29:40
您可以通过nginx.conf文件中的Lua
代码执行Shell脚本来实现此目的.您需要具有 HttpLuaModule 才能做到这一点.
You can execute a shell script via Lua
code from the nginx.conf file to achieve this. You need to have the HttpLuaModule to be able to do this.
以下是执行此操作的示例.
Here's an example to do this.
location /my-website {
content_by_lua_block {
os.execute("/bin/myShellScript.sh")
}
}