I need a config for apache 2.4 which just connects to an open socket and talks fcgi over it.
I am writing my own fcgi-enabled web app. By now, it opens a listening socket and when a web server (nginx at the moment) connects to it (when getting a request from a browser) they talk fcgi over that socket. (So my app basically implements a fcgi responder role acc. to fcgi protocol spec and serves some basic pages over it.) My goal is to enable apache 2.4 to replace nginx in this scenario.
I'd like to start basic:
- http listening port is 2000 for now so no root or priv drop needed
- lauch httpd as normal user with cusomized config file (-f parameter)
- httpd does not need to launch my app, it should expect an open port stated in its conf
- ssl (encryption/security) irrelevant right now (topic for a later date)
- simple apache conf for serving static pages works already
This my simplistic httpd.conf. It works for serving static pages.
DocumentRoot "/tmp/nginx/pages"
Listen 2000
PidFile "/tmp/nginx/httpd.pid"
ErrorLog "/tmp/nginx/error_log"
ServerRoot "/usr/lib64/apache2"
LoadModule authz_core_module mod_authz_core.so
# LoadModule proxy_module mod_proxy.so
# LoadModule proxy_fcgi_module mod_proxy_fcgi.so
# ProxyPass /a unix://tmp/nginx/socket_fcgiMain.s
# LoadModule fcgid_module /usr/lib64/apache2/mod_fcgid.so
# FcgidIPCDir "/tmp/nginx"
My questions:
which is the correct fcgi module for apache:
- mod_proxy_fcgi.so
- mod_fcgid.so
- something else?
How to configure it?