View | Details | Raw Unified | Return to bug 17030
Collapse All | Expand All

(-)a/debian/templates/apache-shared-intranet-plack.conf (-2 / +2 lines)
Lines 28-35 Link Here
28
        ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet"
28
        ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/intranet"
29
29
30
        # Point the /api endpoint to Plack
30
        # Point the /api endpoint to Plack
31
       # ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
31
        ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
32
       # ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
32
        ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
33
33
34
    </IfModule>
34
    </IfModule>
35
</IfVersion>
35
</IfVersion>
(-)a/debian/templates/apache-shared-opac-plack.conf (-2 / +2 lines)
Lines 18-25 Link Here
18
        ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac"
18
        ProxyPassReverse /cgi-bin/koha "unix:/var/run/koha/${instance}/plack.sock|http://localhost/opac"
19
19
20
        # Point the /api endpoint to Plack
20
        # Point the /api endpoint to Plack
21
       # ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
21
        ProxyPass /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
22
       # ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
22
        ProxyPassReverse /api "unix:/var/run/koha/${instance}/plack.sock|http://localhost/api"
23
23
24
    </IfModule>
24
    </IfModule>
25
</IfVersion>
25
</IfVersion>
(-)a/debian/templates/plack.psgi (-7 / +10 lines)
Lines 25-30 use Plack::App::CGIBin; Link Here
25
use Plack::App::Directory;
25
use Plack::App::Directory;
26
use Plack::App::URLMap;
26
use Plack::App::URLMap;
27
27
28
use Mojo::Server::PSGI;
29
28
# Pre-load libraries
30
# Pre-load libraries
29
use C4::Boolean;
31
use C4::Boolean;
30
use C4::Branch;
32
use C4::Branch;
Lines 60-75 my $opac = Plack::App::CGIBin->new( Link Here
60
    root => '/usr/share/koha/opac/cgi-bin/opac'
62
    root => '/usr/share/koha/opac/cgi-bin/opac'
61
)->to_app;
63
)->to_app;
62
64
63
# my $api  = Plack::App::CGIBin->new(
65
my $apiv1  = builder {
64
#     root => '/usr/share/koha/api/'
66
    my $server = Mojo::Server::PSGI->new;
65
# )->to_app;
67
    $server->load_app('/usr/share/koha/api/v1/app.pl');
68
    $server->to_psgi_app;
69
};
66
70
67
builder {
71
builder {
68
72
69
    enable "ReverseProxy";
73
    enable "ReverseProxy";
70
    enable "Plack::Middleware::Static";
74
    enable "Plack::Middleware::Static";
71
75
72
    mount '/opac'     => $opac;
76
    mount '/opac'          => $opac;
73
    mount '/intranet' => $intranet;
77
    mount '/intranet'      => $intranet;
74
    # mount '/api'       => $api;
78
    mount '/api/v1/app.pl' => $apiv1;
75
};
79
};
76
- 

Return to bug 17030