# First, add the following to the global config: | |
lua_package_path '/path/to/ponymail/site/api/?.lua;;'; | |
# Then add this to your server (virtualhost) config: | |
root /path/to/ponymail/site; | |
location ~ ^/api/([-_a-zA-Z0-9]+)\.lua { | |
set $path $1; | |
content_by_lua_file /var/www/ponymail/site/api/$path.lua; | |
} |