windows的程序大小写linux下不兼容解决方案(转载)

尝试了多个方案就春哥的lua靠谱

cd lnmp/src
wget http://luajit.org/download/LuaJIT-2.0.2.tar.gz 
wget https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gz #ngx_devel_kit
wget https://github.com/chaoslawful/lua-nginx-module/archive/v0.9.2.tar.gz #nginx_lua_module
tar xzf LuaJIT-2.0.2.tar.gz
tar xzf v0.2.19.tar.gz
tar xzf v0.9.2.tar.gz
cd LuaJIT-2.0.2
make && make install
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.0

再编译nginx加上2个模块

--add-module=../lua-nginx-module-0.9.2--add-module=../ngx_devel_kit-0.2.19

vhost里加下面的配置

location /{if($uri ~[A-Z]){  

             rewrite_by_lua 'return ngx.redirect(string.lower(ngx.var.uri),ngx.HTTP_MOVED_PERMANENTLY)';}

}

常见错误

# /usr/local/nginx-1.4.2/sbin/nginx -v

./objs/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

解决方法:

# ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2

参考 http://blog.linuxeye.com/382.html

http://www.ttlsa.com/nginx/nginx-modules-ngx_lua/


附件:http://down.51cto.com/data/2364309


本文转自 liang3391 51CTO博客,原文链接:http://blog.51cto.com/liang3391/1396291


上一篇:STL中stack和queue的用法


下一篇:Android Studio 将github作为远程maven仓库