ngx_python 嵌入 Python 脚本的 Nginx 模块

程序名称:ngx_python

授权协议: BSD

操作系统: 跨平台

开发语言: C/C++

ngx_python 介绍

ngx_python 是为 nginx 嵌入 python 脚本的模块。

环境

- python 2.7.*
- nginx-1.6.3+

安装

```sh
git clone https://github.com/rryqszq4/ngx_python.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 PYTHON_INC=/path/to/python/include/python2.7
export PYTHON_BIN=/path/to/python/bin
./configure --user=www --group=www \
            --prefix=/path/to/nginx \
            --add-module=/path/to/ngx_python
```

摘要

```nginx
user www www;
worker_processes  4;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    keepalive_timeout  65;
    server {
        listen       80;
        server_name  localhost;
    
        location /content_by_python {
            content_by_python "
import ngx
ngx.echo('Hello, ngx_python')
            ";
        }
    }
    }
}
```

ngx_python 官网

https://github.com/rryqszq4/ngx_python

相关编程语言

memcached-session-manager 将session存储到memchac...
Tomcat Native 这个项目可以让 Tomcat 使用 Apache ...
EasyTomcat 是一个用来帮助简化 Tomcat 和MySQL 管理...
riak-session-manager 是使用 Riak 来存储Tomcat se...
tomcat-redis-session-manager 是一个用来将 Tomcat...
这是一款在 Oracle 的 JDeveloper 开发环境下管理To...