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

(-)a/etc/koha-nginx-kohaapi.conf (-1 / +49 lines)
Line 0 Link Here
0
- 
1
upstream hypnotoad {
2
    server 127.0.0.1:8080;
3
}
4
5
server {
6
    listen 444;                          ## listen for ipv4
7
    listen [::]:444 default ipv6only=on; ## listen for ipv6
8
9
    #server_name <your_Koha_DNS_Name>;
10
    access_log /home/koha/koha-dev/var/log/kohaapi.access.log;
11
    error_log  /home/koha/koha-dev/var/log/kohaapi.error.log error;
12
13
    root /home/koha/kohaclone/api/;
14
    index index.html;
15
16
    ssl on;
17
    ssl_certificate     ssl/cert.pem;
18
    ssl_certificate_key ssl/key.pem;
19
20
    ssl_session_timeout 5m;
21
22
    ssl_protocols SSLv3 TLSv1;
23
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
24
    ssl_prefer_server_ciphers on;
25
26
    #Redirect root to the Swagger documentation
27
    location = / {
28
        try_files $uri /v1/doc/;
29
    }
30
    #Don't proxy doc
31
    location ^~ /v1/doc/ {
32
        
33
    }
34
    # and no proxying the swagger.json
35
    location = /v1/swagger.json {
36
        
37
    }
38
39
    #Proxy everything else
40
    location /v1/ {
41
        proxy_pass http://hypnotoad;
42
        proxy_http_version 1.1;
43
        proxy_set_header Upgrade $http_upgrade;
44
        proxy_set_header Connection "upgrade";
45
        proxy_set_header Host $host;
46
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
47
        proxy_set_header X-Forwarded-Proto $scheme;
48
    }
49
}

Return to bug 13799