This question about Installation of Foswiki: Answered

How do I get mod_perl with RHEL5 working?

My environment
RHEL 5u3
Foswiki 1.0.6
Apache 2.2.3
ModPerlEngineContrib 0.9.1

I started with plain CGI first, checked OK. Then, I want to switch to mod_perl

First I cannot find mod_perl2 but mod_perl during yum install. However, mod_perl version is 2.0.4, it is actually the mod_perl2?

I dumped a list of loaded Static and Shared Modules (httpd –M) of my Apache and perl_module was there
[root@itvmwk01 logs]# httpd -M
Loaded Modules:
core_module (static)
perl_module (shared)
php5_module (shared)
However, in foswiki/bin/configure, "CGI setup", it shown "mod_perl is not loaded into Apache"

When I access http://localhost/foswiki, it just displays the /foswiki/foswiki/bin/view as plain text.

I commented out all the <IfModule mod_perl.c> in foswiki.conf(generated by under /etc/httpd/conf.d, it worked except foswiki/bin/configure. As here( mentioned it is a known problem, I am not sure how to change the foswiki.conf to fix, could someone please further explain it?

-- HackatonWong - 26 Jun 2009

Foswikis configure tries to detect mod_perl by searching for the string mod_perl in the environment variable SERVER_SOFTWARE. Maybe RHEL does not set this env var.

(Im not familiar with RHEL.) Its possible, that your distribution renamed the mod_perl2 package.

Are you sure, that perl_module means mod_perl?

-- OliverKrueger - 26 Jun 2009

To be 100% sure, I removed the installed package and compiled mod_perl 2.0.4 from the source

Right after the original mod_perl is removed, I started the Apache, I got
"Invalid command 'PerlSwitches'…."
So mod_perl should be removed.

Stop the Apache, compile and install the mod_perl 2.0.4

This time it worked even with <IfModule mod_perl.c>

Now the only problem is how to keep /bin/configure from using mod_perl and stay with plain CGI

-- HackatonWong - 27 Jun 2009

In Foswikis standard configuration for Apache the following is suggested:
<FilesMatch "^configure.*">
        SetHandler cgi-script
-- OliverKrueger - 27 Jun 2009

It still does not work for me.

The Apache Config Generator generated code that is similar to yours (I tried both)
<Directory "/opt/foswiki/foswiki/bin">
    <IfModule mod_perl.c>
        SetHandler perl-script
        PerlResponseHandler Foswiki::Engine::Apache
    <FilesMatch "^(configure)$"">
        SetHandler cgi-script
        Require user admin
Your version and above version both have problem, when I accessed the bin/configure, it jumped to User Registration instead of pop up for basic auth like pure CGI. Is there something else I need to do?

-- HackatonWong - 28 Jun 2009

I assumed some basic knowledge about the Apache Configuration, so I shortened my example. wink If you are not familiar with Apache fundamentals I suggest to take one of the preinstalled vmware images in the Download section.

-- OliverKrueger - 28 Jun 2009

You are right, I am really no expert at Apache configure. I rely on the ApacheConfigGenerator( to do the magic. After a few tries, I found once I pick "None. Use Apache default 401 message " when ask for "Page to return when authentication fails" , it worked.

-- HackatonWong - 28 Jun 2009

QuestionForm edit

Subject Installation of Foswiki
Extension ModPerlEngineContrib
Status Answered
Topic revision: r7 - 28 Jun 2009, HackatonWong - This page was cached on 11 Jan 2018 - 07:26.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License