aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/etc/nginx/vhosts.conf.ttrss_server
blob: fb0343d3d56885a58ee9e7bdf0d52ee089bd5d60 (plain) (blame)
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
server {
  listen 443      ssl default_server;
  listen [::]:443 ssl default_server;
  http2 on;

  root ${ttrss_repo_dir};
  index index.php index.html;

  ssl_certificate      ${ttrss_https_cert};
  ssl_certificate_key  ${ttrss_https_key};

  add_header Strict-Transport-Security "max-age=63072000" always;

  auth_gss_keytab ${ttrss_keytab};
  auth_gss_allow_basic_fallback off;

  location ~ ^/index\.php$ {
    auth_gss on;
    satisfy any;
$(printf '    deny %s;\n' $kerberized_cidrs)
    allow all;

    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f \$document_root\$fastcgi_script_name) {
      return 404;
    }
    fastcgi_index index.php;
    fastcgi_intercept_errors on;
    include fastcgi_params;
    fastcgi_pass unix:${ttrss_fpm_socket};
  }

  location ~ [^/]\.php(/|$) {
    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
    if (!-f \$document_root\$fastcgi_script_name) {
      return 404;
    }
    fastcgi_index index.php;
    fastcgi_intercept_errors on;
    include fastcgi_params;
    fastcgi_pass unix:${ttrss_fpm_socket};
  }
}