Web Servers on Unix and Linux - Apache 1.3 + mod_perl configuration with multiple LocationMatch

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > December 2004 > Apache 1.3 + mod_perl configuration with multiple LocationMatch





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Apache 1.3 + mod_perl configuration with multiple LocationMatch
MT

2004-12-21, 7:46 am

Hi all,
i'm using apache 1.3.33-2 latest debian sarge package with mod_perl
1.29.0.2-16 package. I have trouble setting up the following
configuration with LocationMatch directives, could someone give me some
hints on how i can resolve this issue, here is my virtualhost
configuration for the moment:

<VirtualHost __IP__>
ServerName me.com
ServerAlias *.me.com

DocumentRoot /home/me/www/

PerlAccessHandler Me::Access

# Intercept for http://me.com/ or http://me.com
<LocationMatch "(^/$|^$)">
SetHandler perl-script
PerlHandler Me::Index
</LocationMatch>

# Intercept for http://me.com/fr/contact.cgi
# or http://me.com/de/contact.cgi
# or any http://me.com/\w{2}/contact.cgi
<LocationMatch "^/(\w{2})/contact\.cgi$">
SetHandler perl-script
PerlHandler Me::Contact
</LocationMatch>

# Intercept for http://me.com/fr/support.cgi
# or http://me.com/de/support.cgi
# or any http://me.com/\w{2}/support.cgi
<LocationMatch "^/(\w{2})/support\.cgi$">
SetHandler perl-script
PerlHandler Me::Support
</LocationMatch>

</VirtualHost>

The Index part of the configuration is wokring OK excpets
that the AccessHandler is called twice, don't know why.

I only put 2 other LocationMatch but there can be more, the
main point is that it's going to be a multi-language site and
i want to have url with the follwoing pattern :
http://me.com/LANGUAGE_CODE/HANDLER.cgi . I can't figure out what's
wrong with this configuration.

Finally, I want all other uri's like html pages, css or javascript
files (ending with .html, .gif, .png, .js, etc ..) to be returned
normally by the webserver.

The configuration checks via apache -t are ok, and there no errors in
the logs, only that when calling http://me.com/fr/contact.cgi which
should be handled by the Me::Contact, the webserver return me a 404
error saying that http://me.com/fr/contact.cgi was not found.

All the Perl* Sections of mod_perl in Apache are enabled.

I hope that my request is clear enough and that someone will be willing
to give me a hand. Thanks!

MT
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com