[TriLUG] apache/mod_perl question
William Sutton
william at trilug.org
Mon Nov 21 13:54:40 EST 2005
Hummm...
I now have apache2 and its version of mod_perl installed (had to update
/etc/portage/package.keywords with the following):
www-apache/mod_perl ~x86
perl-core/CGI ~x86
unemerged existing apache, apache2, Apache-Test, mod_perl, emerged new
apache & mod_perl.
Still not quite functioning....current setup:
In httpd.conf, after the default IfDefine lines for /server-status and
/server-info, I added
# mod perl stuff
PerlModule HTML::Mason::ApacheHandler
<Location />
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</Location>
configtest returns:
maul # /etc/init.d/apache2 configtest
* Checking Apache Configuration ...
* Apache2 has detected a syntax error in your configuration files:
Syntax error on line 1090 of /etc/apache2/httpd.conf:
Invalid command 'PerlModule', perhaps mis-spelled or defined by a module
not included in the server configuration
[ !! ]
maul #
I added
AddModule mod_perl.c
(and when that didn't work, for .so) to the beginning of the config block.
Apache seems to think that AddModule isn't valid syntax.
so, back to where I was I guess....any suggestions?
--
William Sutton
On Mon, 21 Nov 2005, Owen Berry wrote:
> Yes, I am running apache2 under Gentoo. However, another caveat I forgot
> to mention is that I am not running mod_perl on this box. I *am* running
> it on a FC3 box, and it uses modules/mod_perl.so in the configuration.
>
> The mod_perl package in Portage has a description of "An embedded Perl
> interpreter for *Apache2*". Have you tried that with Apache2?
>
> Owen
>
> On Mon, 2005-11-21 at 12:19 -0500, William Sutton wrote:
> > Hummm.. are you running apache2/mod_perl under Gentoo? If so, how did you
> > get the apache2 version of mod_perl installed?
> >
> > --
> > William Sutton
> >
> >
> >
> > On Mon, 21 Nov 2005, Owen Berry wrote:
> >
> > > Try mod_perl.so instead, and if your layout matches mine, it would be
> > > modules/mod_perl.so. Run 'locate mod_perl.so' if you're not sure where
> > > it is. A caveat is that I'm running apache2.
> > >
> > > Owen
> > >
> > > On Mon, 2005-11-21 at 11:49 -0500, William Sutton wrote:
> > > > Apparently my google-fu is failing, so here's the situation:
> > > >
> > > > Apache 1.3.33 (installed by gentoo as a result of emerge -v apache):
> > > > Server version: Apache/1.3.33 (Unix) (Gentoo/Linux)
> > > > Server built: Nov 21 2005 11:39:10
> > > > Server's Module Magic Number: 19990320:16
> > > > Server compiled with....
> > > > -D EAPI
> > > > -D EAPI_MM
> > > > -D EAPI_MM_CORE_PATH="/var/cache/apache-mm/mm"
> > > > -D HAVE_MMAP
> > > > -D HAVE_SHMGET
> > > > -D USE_SHMGET_SCOREBOARD
> > > > -D USE_MMAP_FILES
> > > > -D HAVE_FCNTL_SERIALIZED_ACCEPT
> > > > -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
> > > > -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> > > > -D DYNAMIC_MODULE_LIMIT=64
> > > > -D HARD_SERVER_LIMIT=512
> > > > -D HTTPD_ROOT="/usr/lib/apache"
> > > > -D SUEXEC_BIN="/usr/sbin/suexec"
> > > > -D DEFAULT_PIDLOG="/var/run/apache.pid"
> > > > -D DEFAULT_SCOREBOARD="/var/run/apache.scoreboard"
> > > > -D DEFAULT_LOCKFILE="/var/run/apache.lock"
> > > > -D DEFAULT_ERRORLOG="/var/log/apache/error_log"
> > > > -D TYPES_CONFIG_FILE="/etc/apache/mime.types"
> > > > -D SERVER_CONFIG_FILE="/etc/apache/apache.conf"
> > > > -D ACCESS_CONFIG_FILE="/etc/apache/access.conf"
> > > > -D RESOURCE_CONFIG_FILE="/etc/apache/srm.conf"
> > > >
> > > > mod_perl 1.27-r4 according to emerge -vp mod_perl
> > > >
> > > > both, as I say, installed by gentoo. Following the MasonHQ FAQ
> > > > (eventually on my list), I added the following to my apache config file:
> > > >
> > > > AddModule mod_perl.c
> > > > <Location /mason_code>
> > > > SetHandler perl-script
> > > > PerlHandler HTML::Mason::ApacheHandler
> > > > </Location>
> > > >
> > > > When I actually try to use this, however, I get the following:
> > > >
> > > > maul htdocs # /etc/init.d/apache configtest
> > > > * Checking Apache Configuration ...
> > > > * Apache has detected a syntax error in your configuration files:
> > > > Processing config directory: /etc/apache/modules.d/*.conf
> > > > Processing config file: /etc/apache/modules.d/10_mod_ssl.conf
> > > > Syntax error on line 982 of /etc/apache/httpd.conf:
> > > > Cannot add module via name 'mod_perl.c': not in list of loaded modules
> > > > [ !! ]
> > > >
> > > > If anyone can offer suggestions? I would greatly appreciate it.
> > > >
> > > > --
> > > > William Sutton
> > >
> > >
>
>
More information about the TriLUG
mailing list