ngx_sqlite Nginx 的 SQLite 模块 项目简介
ngx_sqlite 是嵌入 sqlite 数据库的 nginx 模块。通过强大的nginx server,可以使用http协议访问sqlite数据库。环境- sqlite 3- nginx-1.6.3+ 安装```sh
$ git clone https://github.com/rryqszq4/ngx_sqlite.git
$ wget 'http://nginx.org/download/nginx-1.6.3.tar.gz'
$ tar -zxvf nginx-1.6.3.tar.gz
$ cd nginx-1.6.3
$ export SQLITE_INC=/path/to/sqlite
$ export SQLITE_LIB=/path/to/sqlite
$ ./configure --user=www --group=www \
--prefix=/path/to/nginx \
--add-module=/path/to/ngx_sqlite
$ make
$ make install
```摘要```nginx
user www www;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
sqlite_database test.db;
server {
listen 80;
server_name localhost;
location /sqlite {
sqlite_query "select * from test;";
}
}
}
```
$ git clone https://github.com/rryqszq4/ngx_sqlite.git
$ wget 'http://nginx.org/download/nginx-1.6.3.tar.gz'
$ tar -zxvf nginx-1.6.3.tar.gz
$ cd nginx-1.6.3
$ export SQLITE_INC=/path/to/sqlite
$ export SQLITE_LIB=/path/to/sqlite
$ ./configure --user=www --group=www \
--prefix=/path/to/nginx \
--add-module=/path/to/ngx_sqlite
$ make
$ make install
```摘要```nginx
user www www;
worker_processes 4;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
sqlite_database test.db;
server {
listen 80;
server_name localhost;
location /sqlite {
sqlite_query "select * from test;";
}
}
}
```