blob: 48842d18ba33cf05cc53728961f9ec991f83e516 (
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
44
45
46
|
upstream upload_emacsconf {
server 127.0.0.1:3000;
}
server {
listen 80;
listen [::]:80;
server_name {{ upload_server_name }};
include snippets/well-known-acme-challenge.conf;
location / {
return 302 https://$server_name$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ upload_server_name }};
ssl_certificate /var/local/dehydrated/certs/{{ upload_server_name }}/fullchain.pem;
ssl_certificate_key /var/local/dehydrated/certs/{{ upload_server_name }}/privkey.pem;
ssl_trusted_certificate /var/local/dehydrated/certs/{{ upload_server_name }}/fullchain.pem;
include ssl_params.local;
include snippets/well-known-acme-challenge.conf;
{% if upload_enabled %}
location @upload_emacsconf {
proxy_pass http://upload_emacsconf;
proxy_http_version 1.1;
proxy_buffering off;
proxy_request_buffering off; # needs nginx version >= 1.7.11
proxy_set_header Host $http_host;
}
location / {
#try_files $uri $uri/ @upload_emacsconf;
proxy_pass http://upload_emacsconf;
proxy_http_version 1.1;
proxy_buffering off;
proxy_request_buffering off; # needs nginx version >= 1.7.11
proxy_set_header Host $http_host;
}
{% else %}
root {{ upload_done_dir }};
{% endif %}
}
|