Skip to content

Instantly share code, notes, and snippets.

@leafo
Created December 4, 2013 08:44
Show Gist options
  • Save leafo/7784297 to your computer and use it in GitHub Desktop.
Save leafo/7784297 to your computer and use it in GitHub Desktop.
worker_processes 1;
error_log stderr notice;
daemon off;
# Adding these will make the second server correct
# env LUA_PATH;
# env LUA_CPATH;
events {
worker_connections 1024;
}
http {
server {
listen 8181;
default_type text/plain;
lua_code_cache on;
location / {
content_by_lua '
ngx.print(package.path .. "\\n\\n")
ngx.print(package.cpath .. "\\n\\n")
';
}
}
server {
listen 8182;
default_type text/plain;
lua_code_cache off;
location / {
content_by_lua '
ngx.print(package.path .. "\\n\\n")
ngx.print(package.cpath .. "\\n\\n")
';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment