LoadModule perl_module       modules/mod_perl.so
LoadModule apreq_module    modules/mod_apreq2.so

<IfModule perl_module>

NameVirtualHost *:80
PerlSwitches -T

<VirtualHost *:80>
    ServerName admin.localhost

    <Location />
        SetHandler perl-script
        PerlAuthenHandler   Modwheel::Apache2::Authen
        PerlResponseHandler Modwheel::Apache2
        #PerlOptions +GlobalRequest
        PerlSetVar ModwheelPrefix       /opt/devel/Modwheel
        PerlSetVar ModwheelConfigFile   config/modwheelconfig.yml
        PerlSetVar ModwheelSite         Admin
        PerlSetVar ModwheelFileUploads  Yes
        PerlSetVar Locale               en_EN
        PerlSetVar DontHandle           "rep javascript css images"

        AuthType Basic
        AuthName "Modwheel admin interface."
        Require valid-user
    </Location>

    Alias /rep /opt/devel/Modwheel/Repository
    Alias /css /opt/devel/Modwheel/Templates/SimpleAdmin/css
    Alias /javascript /opt/devel/Modwheel/Templates/SimpleAdmin/javascript

    <Directory /opt/devel/Modwheel/Repository/*/*>
        Order Deny,Allow
        Allow from all
    </Directory>

    <Directory /opt/devel/Modwheel/Templates/*/*>
        Order Deny,Allow
        Allow from all
    </Directory>

    ErrorLog logs/error_log
</VirtualHost>

<VirtualHost *:80>
    ServerName localhost
    <Location />
        SetHandler perl-script
        PerlResponseHandler Modwheel::Apache2
        PerlOptions +GlobalRequest
        PerlSetVar ModwheelPrefix       /opt/devel/Modwheel
        PerlSetVar ModwheelConfigFile   config/modwheelconfig.yml
        PerlSetVar ModwheelSite         Simple
        PerlSetVar ModwheelFileUploads  No
        PerlSetVar ModwheelWebPathToId  Yes
        PerlSetVar Locale               en_EN
        PerlSetVar DontHandle           "rep javascript css images"
    </Location>

    Alias /rep /opt/devel/Modwheel/Repository
    Alias /css /opt/devel/Modwheel/Templates/SimpleAdmin/css
    Alias /javascript /opt/devel/Modwheel/Templates/SimpleAdmin/javascript

    <Directory /opt/devel/Modwheel/Repository/*/*>
        Order Deny,Allow
        Allow from all
    </Directory>

    <Directory /opt/devel/Modwheel/Templates/*/*>
        Order Deny,Allow
        Allow from all
    </Directory>
    ErrorLog logs/error_log
</VirtualHost>

</IfModule>

