您的位置:首页 > 编程语言 > Lua

openresty php luajit

2013-12-06 20:56 495 查看
http://www.cppblog.com/AutomateProgram/archive/2013/03/21/198685.html

yum install -y pcre-devel readline-devel openssl-devel

mkdir download

cd download

wget http://openresty.org/download/ngx_openresty-1.4.3.6.tar.gz
tar xvf ngx_openresty-1.4.3.6.tar.gz

cd ngx_openresty-1.4.3.6

./configure --with-luajit

gmake

gmake install

nano /usr/local/openresty/nginx/conf/nginx.conf

location /hello {

default_type 'text/plain';

content_by_lua 'ngx.say("hello, lua")';

}

/usr/local/openresty/nginx/sbin/nginx

/usr/local/openresty/nginx/sbin/nginx -s reload

===

git clone http://luajit.org/git/luajit-2.0.git
cd luajit-2.0

make

make install

===============

yum install -y php php-devel php-mysql

php-cgi -b 127.0.0.1:9000

nano www/index.php

==nginx==

server {

listen 80;

server_name myserver.com;

charset utf-8;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $http_x_forwarded_for;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

location ~ \.php$ {

root /root/www;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

include fastcgi_params;

}

}

nohup php-cgi -b 127.0.0.1:9000 > /dev/null 2> /dev/null &
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: