Internal route access

18 views
Skip to first unread message

ary...@yahoo.com

unread,
Jul 15, 2016, 3:51:52 PM7/15/16
to openresty-en
Hi,
     I have a internal route specified in my nginx configuration like:

 location /static/ {
  internal;
  alias static/;
 }

Now when a browser types that route then the 404 Not found message is displayed with the OpenResty version. Is there a way I can use a custom Lua handler to create that 404 message?

Thanks

Yichun Zhang (agentzh)

unread,
Jul 16, 2016, 1:30:41 AM7/16/16
to openresty-en
Hello!
Just check out the standard error_log directive and ngx_lua's
content_by_lua* directive.

Regards,
-agentzh
Reply all
Reply to author
Forward
0 new messages