File: kopano-webapp-nginx.conf

package info (click to toggle)
kopano-webapp 3.5.14+dfsg1.orig-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 45,160 kB
  • sloc: php: 35,994; xml: 2,116; sh: 436; makefile: 370; java: 300; python: 152; ruby: 14
file content (76 lines) | stat: -rw-r--r-- 2,578 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#      Default NGinx server configuration for kopano-webapp-nginx.
# This file will be overridden by updates, keep your settings into the file
# '/etc/kopano/webapp/kopano-webapp-nginx-servers.conf'.

server {
    listen 80;
    root /usr/share/kopano-webapp;
    # Redirect all request to https
    rewrite ^(.*) https://$host$1 permanent;
    # No 'server_name' definition here, please add any server names into the
    # following included configuration.
    include /etc/kopano/webapp/kopano-webapp-nginx-servers.conf;
}

server {
    listen 443;
    # No 'server_name' definition here, please add any server names into the
    # following included configuration at the bottom of 'server {}'.
    root /usr/share/kopano-webapp;
    set $version @version@;

    ssl on;
    include /etc/kopano/webapp/kopano-webapp-nginx-ssl.conf;
    # Please note! You need to override the intermediate certificate and key
    # not here but within the included file
    # '/etc/kopano/webapp/kopano-webapp-nginx-servers.conf'

    # Pass PHP scripts to FastCGI server
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        # With php-fpm (or other unix sockets):
        fastcgi_pass unix:/var/run/php/php$version-fpm.sock;
        # With php-cgi (or other tcp sockets):
        # fastcgi_pass 127.0.0.1:9000;
    }

     location / {
        root /usr/share/kopano-webapp;
        try_files $uri $uri/ =404;
        index index.php;
        location ~ \.php$ {
            include snippets/fastcgi-php.conf;
            # With php-fpm (or other unix sockets):
            fastcgi_pass unix:/var/run/php/php$version-fpm.sock;
            # With php-fpm (or other unix sockets):
            # fastcgi_pass 127.0.0.1:9000;
            fastcgi_param SCRIPT_FILENAME $request_filename;
        }
    }


    location ^~ /webapp {
        alias /usr/share/kopano-webapp;
        index index.php;
        location ~ \.php$ {
            include snippets/fastcgi-php.conf;

            fastcgi_pass unix:/var/run/php/php$version-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            # With php-fpm (or other unix sockets):
            # fastcgi_pass 127.0.0.1:9000;
        }
    }


    # Deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one.
    location ~ /\.ht {
        deny all;
    }
    # Once again, add the needed values for 'server_name' in the included file
    # below.
    include /etc/kopano/webapp/kopano-webapp-nginx-servers.conf;
}

# vim: autoindent ts=4 sw=4 expandtab softtabstop=4 ft=conf