Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.4K
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda