123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- worker_processes auto;
- # pid /tmp/nginx.pid;
- error_log stderr crit;
- #error_log /tmp/test.log error;
- env LAPIS_ENVIRONMENT;
- daemon off;
- events {
- worker_connections 16384;
- }
- http {
- variables_hash_max_size 1024;
- access_log off;
- include mime.types;
- upstream database {
- postgres_server DBHOSTNAME dbname=hello_world user=benchmarkdbuser password=benchmarkdbpass;
- }
- init_by_lua 'require "resty.core"; lapis = require "lapis.init"';
- server {
- listen 8080;
- lua_code_cache on;
- charset "utf-8";
- location / {
- default_type text/html;
- set $_url "";
- content_by_lua_file "loader.lua";
- }
- location /static/ {
- alias static/;
- }
- location /favicon.ico {
- alias static/favicon.ico;
- }
- location = /query {
- internal;
- postgres_pass database;
- postgres_query $echo_request_body;
- }
- }
- }
|