nginx.conf添加lua.conf配置


1.在nginx的conf下配置lua.conf。。。。。。vi lua.conf

server {
listen 80;
server_name _;

location /lua {
default_type 'text/html';
lua_code_cache off;
content_by_lua_file /usr/local/openrestry/lua/test.lua;
}
} 

2.在nginx.conf配置指向lua.conf,在nginx.conf的http內配置,路徑根據自己情況定義

http {
include mime.types;
default_type application/octet-stream;
//.....
lua_package_path "/usr/local/openresty/lualib/?.lua;;";
lua_package_cpath "/usr/servers/openresty/?.so;;";
include lua.conf;
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM