文件名称:嵌入Python脚本的Nginx模块ngx_python.zip
文件大小:16KB
文件格式:ZIP
更新时间:2022-08-07 22:30:30
开源项目
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') "; } } } } ``` 标签:ngxpython
【文件预览】:
ngx_python-master
----.travis.yml(792B)
----config(1KB)
----t()
--------library()
----LICENSE(1KB)
----src()
--------ngx_http_python_code.c(2KB)
--------ngx_http_python_handler.c(13KB)
--------ngx_http_python_handler.h(1KB)
--------ngx_http_python_output.h(314B)
--------ngx_http_python_directive.h(906B)
--------python()
--------ngx_http_python_code.h(996B)
--------ngx_http_python_directive.c(6KB)
--------ngx_http_python_module.c(9KB)
--------ngx_python_uthread.c(1KB)
--------ngx_python_uthread.h(1KB)
--------ngx_http_python_output.c(2KB)
--------ngx_http_python_module.h(1KB)
----travis()
--------compile.sh(1KB)
----.gitignore(251B)
----README.md(3KB)