I've spent at least a couple of hours trying to figure this out and
reading manuals, to no avail, hence asking here.  I hope it's not too
obvious :-).

I'm running a mod_perl (2.0.2) script from the root of my domain.  My
Apache (2.2.3) configuration is as follows.

<VirtualHost *>
    . . .
    PerlOptions +Parent
    PerlSwitches -T -I/var/www/testsite

    <Location />
        SetHandler perl-script
        PerlResponseHandler TestSite
    </Location>
</VirtualHost>


My script takes the whole URI and uses that as part of the input to tell
it which part of the site the user wants to visit (such as / for the
home page or /account to manage their contact details).

The problem is that, because the script overrides the whole domain, a
request for /logo.png or the CSS file will not work properly.

I have tried using mod_rewrite to combat this, to no avail.  I think the
problem is that when I was using mod_python on a different site (a
MoinMoin wiki as it happens), the handling of the request is different;
it'd be more like the following:

    # map /wiki static files to Moin htdocs
    RewriteRule ^/wiki/(.*)$ /var/www/agdev-wiki/htdocs/$1 [last]
    # map everything else to server script
    RewriteRule ^(.*)$ /var/www/agdev-wiki/moinmodpy.py$1

In this case, I can successfully use mod_rewrite because I can send the
request to a certain script.  I can't see how to send the request to a
certain location, as would appear to be required by the mod_perl setup.

Could someone direct me to instructions or an example Apache config
where they're running a mod_perl script at the domain root?

Thanks very much for your time,

best regards,


P.S. My site is now running much faster under mod_perl (albeit without
CSS or a logo at the moment :-)) -- mod_perl really does seem to rock
maximally and I'm looking forward to getting it all working smoothly.
-- 
Matthew Tylee Atkinson <[EMAIL PROTECTED]>

Reply via email to