Apache2::Dispatch issue

Joe Breeden <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hey All,

I have been using Apache2::Dispatch with a fair amount of success - and
thank you Fred Moyer very much for this Perl module - until I tried to use
it with a specific web app/virtual host configuration. I wonder if someone
could take a moment and help me out. Basically, I have one "web app" that I
would like to use on two different virtual hosts on my server. When I
configure the location directive, one host works and the other fails. I have
attached the virtualhost config from my server.

As you can see there is nothing out of the ordinary in my configuration. If
I use that configuration and try to access
http://f4lkids.joehep.com/adminis loads as expect, but when I try to
access
http://f4l.joehep.com/admin I get a 'File does not exist:
/var/www/sites/fit4life/public_html/admin' line in the error log. The
authentication request is made, so I think apache is recognizing the
location directive and if I comment out the f4lkids.joehep.com virtual host
the f4l.joehep.com call works correctly.

I've done the normal searching - google, google groups, the this mailing
list, etc and have not seen anything relating to this issue. If someone
could point me in the correct direction, I would appreciate it. Thank you in
advance for your help.

Thanks,
Joe Breeden
virtual_host_conf.txt (text/plain, 2.8 KB)
NameVirtualHost aaa.bbb.ccc.ddd:80

<VirtualHost aaa.bbb.ccc.ddd:80>
    ServerAdmin "[email protected]"
    ServerName f4l.joehep.com
    MIMEMagicFile /dev/null
    CustomLog logs/f4l.joehep.com_access_log "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    ErrorLog logs/f4l.joehep.com_error_log

    PerlOptions +Parent
    PerlSwitches -I/var/www/sites/fit4life/app/lib
    SetEnv TEMPLATEPATH /var/www/sites/fit4life/app/templates

    DocumentRoot "/var/www/sites/fit4life/public_html"
    <Directory "/var/www/sites/fit4life/public_html">
        Options +Indexes +FollowSymLinks
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>

    <Location /programregister>
        SetHandler perl-script
        PerlHandler F4L::ProgramRegister
    </Location>

    PerlLoadModule Apache2::Dispatch
    PerlLoadModule F4L::Admin::Dashboard
    PerlLoadModule F4L::Admin::Dashboard::users
    PerlLoadModule F4L::Admin::Dashboard::templates
    PerlLoadModule F4L::Admin::Dashboard::pages
    PerlLoadModule F4L::Admin::Dashboard::images

    <Location /admin>
        PerlSetVar xmlFileName fit4life.conf.xml
        PerlAuthenHandler F4L::Admin::Basic
        AuthType Basic
        AuthName "Fit4LifeKidsAdmin"
        require valid-user

        SetHandler perl-script
        PerlHandler Apache2::Dispatch

        DispatchPrefix F4L::Admin::Dashboard
        DispatchStat On
        DispatchDebug 2
    </Location>

</VirtualHost>

NameVirtualHost aaa.bbb.ccc.ddd:80

<VirtualHost aaa.bbb.ccc.ddd:80>
    ServerAdmin "[email protected]"
    ServerName f4lkids.joehep.com
    MIMEMagicFile /dev/null
    CustomLog logs/f4lkids.joehep.com_access_log "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    ErrorLog logs/f4lkids.joehep.com_error_log

    PerlOptions +Parent
    PerlSwitches -I/var/www/sites/fit4life/app/lib
    SetEnv TEMPLATEPATH /var/www/sites/fit4life/app/templates

    DocumentRoot "/home/f4lkids/public_html"
    <Directory "/home/f4lkids/public_html">
        Options +Indexes +FollowSymLinks
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>

    PerlLoadModule Apache2::Dispatch
    PerlLoadModule F4L::Admin::Dashboard
    PerlLoadModule F4L::Admin::Dashboard::users
    PerlLoadModule F4L::Admin::Dashboard::templates
    PerlLoadModule F4L::Admin::Dashboard::pages
    PerlLoadModule F4L::Admin::Dashboard::images

    <Location /admin>
        PerlSetVar xmlFileName fit4lifekids.conf.xml
        PerlAuthenHandler F4L::Admin::Basic
        AuthType Basic
        AuthName "Fit4LifeKidsAdmin"
        require valid-user

        SetHandler perl-script
        PerlHandler Apache2::Dispatch

        DispatchPrefix F4L::Admin::Dashboard
       DispatchStat On
        DispatchDebug 2
    </Location>

</VirtualHost>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.