[root@eshop-cache01 ~]# cd /usr/hello/
[root@eshop-cache01 hello]# ll
total 16
-rw-r--r--. 1 root root 291 Apr 26 18:18 hello.conf
drwxr-xr-x. 2 root root 4096 Jun 6 00:07 lua
drwxr-xr-x. 6 root root 4096 May 23 17:47 lualib
[root@eshop-cache01 hello]# ll
total 16
-rw-r--r--. 1 root root 291 Apr 26 18:18 hello.conf
drwxr-xr-x. 2 root root 4096 Jun 6 00:07 lua
drwxr-xr-x. 6 root root 4096 May 23 17:47 lualib
drwxr-xr-x. 2 root root 4096 Apr 26 18:30 templates
[root@eshop-cache01 hello]# vi hello.conf
打开
第一处为 url访问路径
第二处为 lua脚本位置
然后去该位置编写lua脚本。
最后不要忘记 刷新一下nginx
/usr/servers/nginx/sbin/nginx -s reload