Skip to content

Instantly share code, notes, and snippets.

@agentzh
Created December 12, 2013 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agentzh/7922870 to your computer and use it in GitHub Desktop.
Save agentzh/7922870 to your computer and use it in GitHub Desktop.
nginx.conf for proving that access_by_lua can be used in http {} blocks
worker_processes 1;
daemon on;
master_process on;
error_log logs/error.log debug;
pid logs/nginx.pid;
http {
access_log logs/access.log;
#access_log off;
default_type text/plain;
keepalive_timeout 68;
access_by_lua '
ngx.say("hello from access_by_lua")
ngx.exit(200)
';
server {
listen 8080;
server_name 'localhost';
client_max_body_size 30M;
#client_body_buffer_size 4k;
# Begin preamble config...
# End preamble config...
# Begin test case config...
location = /t {
echo blah;
}
}
}
events {
#accept_mutex off;
worker_connections 1024;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment