Re: Perl problem

Daniel Ferradal Márquez <[email protected]> Sun, 17 Aug 2025 12:42:50 +0200
Newsgroups gmane.comp.apache.user
Organization Apache Software Foundation
Message-ID <[email protected]>

On 7/30/25 9:17 AM, Mufit Eribol wrote:
> Dear Friends,
> 
> I am running Apache 2.4.62 on an AlmaLinux 9.6 VPS and have a problem
> with running perl scripts in apache.
> 
> If I leave /etc/httpd/conf.modules.d/00-mpm.conf as default:
> 
> LoadModule mpm_event_module modules/mod_mpm_event.so
> #LoadModule mpm_event_module modules/mod_mpm_prefork.so
> 
> no perl file in apache executes.
> 
> If I change to this:
> 
> #LoadModule mpm_event_module modules/mod_mpm_event.so
> LoadModule mpm_event_module modules/mod_mpm_prefork.so
> 
> Perl files executes as normal, but this time WordPress can't write to
> its own directories.
> 
> By the way, all WordPress directories/files are owned by apache and
> chmod 755/644, respectively. httpd and php-fpm are run by apache user.
> 
> I got support of a freelancer for this issue. She fixed it somehow
> albeit not in a perfect way to me. She installed Ngix working on port
> 8080 alongside Apache. Setup perl socket on Nginx. Configured Nginx as
> proxy for Apache. So, perl is being handled only by Nginx. All the
> normal web server jobs are handled by Apache. 00-mpm.conf stays as
> default (event).
> 
> This way, perl scripts are handled by nginx, all the other web server
> jobs by Apache. This is a complicated solution for me.
> 
> Is there a way for Apache to handle web server jobs and also perl
> scripts? How can I fix this problem without resorting to Nginx for perl
> scripts?
> 
> Thank you.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

-- 
MPM modules are multiprocess modules for apache to run in a a threaded 
model and such, they have nothing to do with running perl scripts.

You will probably need mod_cgid and additional configuration to run perl 
scripts.

Make a stop at https://httpd.apache.org/docs/2.4/howto/cgi.html and 
check the examples and guidance there.

Once you get to run the typical hello world script you may focus on 
larger things and security.



-Daniel
Find help at #httpd in Libera.chat