Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.4K
Views
Apache: how to call "static int lua_handler(request_rec *r)" function from the proxy

Hello everybody,

I m trying to call the Apache lua module from "mod_proxy_wstunnel.c" in order to exploit the mod_lua functions.

Herein my code [mod_proxy_wstunnel.c]:

...
#include "#include "../../mod_lua.h"
...
...
static void ap_proxy_http_register_hook(apr_pool_t *p)
{   
    proxy_hook_scheme_handler(proxy_wstunnel_handler, NULL, NULL, APR_HOOK_FIRST);
    proxy_hook_canon_handler(proxy_wstunnel_canon, NULL, NULL, APR_HOOK_FIRST);
    ap_hook_handler(lua_handler, NULL, NULL, APR_HOOK_MIDDLE); // added line
}

I added the ap_hook_handler(lua_handler, NULL, NULL, APR_HOOK_MIDDLE); line in order to call the mod_lua handler.

  • static int lua_handler(request_rec *r) function is located in httpd-2.4.43/modules/lua/mod_lua.c
  • static void ap_proxy_http_register_hook(apr_pool_t *p) is located in httpd-2.4.43/modules/proxy/mod_proxy_wstunnel.c

When I compile, I get this error: mod_proxy_wstunnel.c:19:10: fatal error: ../../mod_lua.h: No such file or directory 19 | #include "../../mod_lua.h"

Any help or idea is welcome. Thank you at advance.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!