comparison host/startup/nginx.default.conf.luan @ 1630:b735ed134662

add nginx and ssl for host
author fffilimonov
date Fri, 10 Dec 2021 17:08:17 +0000
parents
children
comparison
equal deleted inserted replaced
1629:124887e02dab 1630:b735ed134662
1 local rootDir, leKey = ...
2
3 %>
4 client_max_body_size 32m;
5
6 proxy_http_version 1.1;
7 proxy_set_header Host $http_host;
8 error_log <%=rootDir%>/logs/nginx_error.log;
9
10 proxy_set_header X-Forwarded-Proto $scheme;
11 proxy_set_header X-Real-IP $remote_addr;
12
13 charset utf-8;
14
15 location ~ "^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$" {
16 default_type text/plain;
17 return 200 "$1.<%=leKey%>";
18 }
19
20 location ~ /(?<path>.*) {
21 proxy_cache_key $scheme$host$request_uri;
22 proxy_cache nginx_cache;
23 proxy_cache_revalidate on;
24 proxy_cache_min_uses 1;
25 proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
26 proxy_cache_background_update on;
27 proxy_cache_lock on;
28 add_header X-Cache-Status $upstream_cache_status;
29 proxy_pass http://luan;
30 }
31 <%