summaryrefslogtreecommitdiff
path: root/images/router/nginx/http/paste
blob: f91b1bafce13838f94b178fba1d89073afc72ec1 (plain)
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
server {
  listen 443 ssl http2;
  listen [::]:443 ssl http2;

  server_name tx0.co p.* paste.*;

  include snippets/ssl_http;
  include snippets/wellknown;

  location / {
    limit_except GET HEAD {
      auth_basic 'Restricted';
      auth_basic_user_file /app/auth/paste;
    }

    include snippets/uwsgi_params;

    uwsgi_pass paste:10002;

    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Fowarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $server_name;
  }
}