Started ripping out mod_perl
This commit is contained in:
parent
97432e2407
commit
7603fce565
9 changed files with 181 additions and 249 deletions
|
|
@ -1,25 +1,29 @@
|
|||
use Plack::Builder;
|
||||
use lib '/data/WebGUI/lib';
|
||||
use WebGUI;
|
||||
WebGUI->init( root => '/data/WebGUI', config => 'dev.localhost.localdomain.conf' );
|
||||
|
||||
my $wg = WebGUI->new(
|
||||
root => '/data/WebGUI',
|
||||
config => 'dev.localhost.localdomain.conf',
|
||||
);
|
||||
|
||||
builder {
|
||||
|
||||
# Handle /extras via Plack::Middleware::Static
|
||||
# (or Plack::Middleware::WebGUI could do this for us by looking up extrasPath and extrasURL in site.conf)
|
||||
enable 'Plack::Middleware::Static',
|
||||
path => qr{^/extras/},
|
||||
root => '/data/WebGUI/www';
|
||||
# enable 'Plack::Middleware::Static',
|
||||
# path => '^' . $wg->config->get('extrasURL') . '/',
|
||||
# root => $wg->config->get('extrasPath');
|
||||
#
|
||||
# # Handle /uploads via Plack::Middleware::WGAccess (including .wgaccess)
|
||||
# # (or Plack::Middleware::WebGUI could do this for us by looking up uploadsPath and uploadsURL in site.conf)
|
||||
# #enable 'Plack::Middleware::WGAccess',
|
||||
# # path => '^' . $wg->config->get('uploadsURL') . '/',
|
||||
# # root => $wg->config->get('uploadsPath');
|
||||
#
|
||||
# enable 'Plack::Middleware::Static',
|
||||
# path => '^' . $wg->config->get('uploadsURL') . '/',
|
||||
# root => $wg->config->get('uploadsPath');
|
||||
|
||||
# Handle /uploads via Plack::Middleware::WGAccess (including .wgaccess)
|
||||
# (or Plack::Middleware::WebGUI could do this for us by looking up uploadsPath and uploadsURL in site.conf)
|
||||
#enable 'Plack::Middleware::WGAccess',
|
||||
# path => qr{^/uploads/},
|
||||
# root => '/data/domains/dev.localhost.localdomain/public';
|
||||
|
||||
enable 'Plack::Middleware::Static',
|
||||
path => qr{^/uploads/},
|
||||
root => '/data/domains/dev.localhost.localdomain/public';
|
||||
|
||||
sub { WebGUI::handle_psgi(shift) };
|
||||
sub { $wg->run(@_) };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue