I've heard great things about nginx. In relation to this article, how would you implement the lua script presented in this article with nginx? I know that Perl can be embedded in the server, but I'm not sure if that would be the proper solution for deciding which files to serve statically and which to serve dynamically at the httpserver level.
Comments
I've heard great things about nginx. In relation to this article, how would you implement the lua script presented in this article with nginx? I know that Perl can be embedded in the server, but I'm not sure if that would be the proper solution for deciding which files to serve statically and which to serve dynamically at the httpserver level.
you probably don't need perl for that. afaics from the snippet, it fits into nginx mod_rewrite. maybe something like this:
if ($http_cookie ~* "auth=1" ) { proxy_pass http://backend ; break ; }
if (!-f $request_filename) { proxy_pass http://backend ; break ; }