Ivan Shmakov
2013-02-15 20:45:47 UTC
Is there an easy way to run Perl CGI::Simple-based code
interfacing Apache 2.2, under a separate UID? (Apart of suexec,
that is, which, depending on the circumstances, may or may not
constitute "an easy way.") I'd like to make the code
"persistent" as well, but it's not a hard requirement for now.
I've been thinking of using mod_scgi on the Apache's side and
SCGI on Perl's, but I don't seem much work done on either in the
last five years or so.
AIUI, the SCGI specification allows the server to pass pretty
much the same information to the "CGI" code as does CGI proper,
thus, perhaps, it'd be possible for CGI::Simple (upon which my
existing code is based) to support it with little change. Also,
it may make sense to check if Apache's mod_scgi can be adapted
to allow for a Unix domain socket (AF_UNIX) to be used (instead
of AF_INET6 or AF_INET.)
The FCGI Perl module and mod_fcgi look like a bit more promising
a couple, as they seem to support AF_UNIX sockets "out of box."
Are there any issues likely to arise with them?
Finally, should I consider a PSGI implementation (Plack?) along
with Apache for my purpose? Should I use, say,
Plack::Handler::FCGI, for instance?
TIA.
PS. It's possible that I'll consider switching from Apache to Lighttpd
later, so I wonder if there could be any "CGI-like" interfaces
implemented for both of these HTTP servers?
interfacing Apache 2.2, under a separate UID? (Apart of suexec,
that is, which, depending on the circumstances, may or may not
constitute "an easy way.") I'd like to make the code
"persistent" as well, but it's not a hard requirement for now.
I've been thinking of using mod_scgi on the Apache's side and
SCGI on Perl's, but I don't seem much work done on either in the
last five years or so.
AIUI, the SCGI specification allows the server to pass pretty
much the same information to the "CGI" code as does CGI proper,
thus, perhaps, it'd be possible for CGI::Simple (upon which my
existing code is based) to support it with little change. Also,
it may make sense to check if Apache's mod_scgi can be adapted
to allow for a Unix domain socket (AF_UNIX) to be used (instead
of AF_INET6 or AF_INET.)
The FCGI Perl module and mod_fcgi look like a bit more promising
a couple, as they seem to support AF_UNIX sockets "out of box."
Are there any issues likely to arise with them?
Finally, should I consider a PSGI implementation (Plack?) along
with Apache for my purpose? Should I use, say,
Plack::Handler::FCGI, for instance?
TIA.
PS. It's possible that I'll consider switching from Apache to Lighttpd
later, so I wonder if there could be any "CGI-like" interfaces
implemented for both of these HTTP servers?
--
FSF associate member #7257
FSF associate member #7257