54 lines
1.7 KiB
Nginx Configuration File
54 lines
1.7 KiB
Nginx Configuration File
worker_processes auto; #nginx worker 数量
|
|
error_log /home/frankly/work/AuthPlatform/logs/error.log info; #指定错误日志文件路径
|
|
|
|
#worker_rlimit_nofile 65535;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
|
|
##lua_need_request_body on; #开启读取请求体数据
|
|
client_max_body_size 1024M; #允许最大100k的请求体
|
|
client_body_buffer_size 1024M; #设置缓冲区大小
|
|
|
|
lua_package_path '$prefix/src/?/?.lua;$prefix/src/?.lua;/home/frankly/work/AuthPlatform/src/?/?.lua;/home/frankly/work/AuthPlatform/src/?.lua;;';
|
|
lua_package_cpath '$prefix/src/share/lib/?.so;;';
|
|
|
|
# Path of the file with trusted CA certificates.
|
|
#lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
|
|
|
|
# The verification depth in the server certificates chain.
|
|
#lua_ssl_verify_depth 3;
|
|
|
|
server {
|
|
listen 9080;
|
|
server_name 127.0.0.1;
|
|
default_type text/html;
|
|
location = /favicon.ico {
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
## 应用路径
|
|
set $APP_PATH '/home/frankly/work/AuthPlatform';
|
|
|
|
|
|
#access_by_lua_file '${APP_PATH}/src/auth/jwt-auth.lua';
|
|
#数据列表配置
|
|
include 'system/system.conf';
|
|
|
|
#测试接口配置
|
|
location /testSQL {
|
|
content_by_lua_file '${APP_PATH}/src/test/testPostgres.lua';
|
|
}
|
|
location /cjson {
|
|
content_by_lua_file '${APP_PATH}/src/test/test.lua';
|
|
}
|
|
#jwt验证进行测试
|
|
location /api/test {
|
|
access_by_lua_file '${APP_PATH}/src/auth/jwt-auth.lua';
|
|
proxy_pass http://192.168.147.1:3000;
|
|
}
|
|
}
|
|
} |