forked from grishka/Smithereen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
30 lines (26 loc) · 797 Bytes
/
nginx.conf
File metadata and controls
30 lines (26 loc) · 797 Bytes
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
# Create a directory at /opt/smithereen/nginx_cache/images first!
proxy_cache_path /opt/smithereen/nginx_cache/images levels=1:2 keys_zone=sm_images:10m max_size=1G inactive=3650d;
server{
server_name YOUR_DOMAIN_HERE;
client_max_body_size 40M;
location /s/ {
root /var/www;
expires max;
}
location /i/ {
proxy_pass http://127.0.0.1:4560;
proxy_cache sm_images;
proxy_cache_lock on;
proxy_ignore_headers Cache-Control;
proxy_cache_valid any 3650d;
expires max;
}
location / {
proxy_pass http://127.0.0.1:4567;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
http2_push_preload on;
listen [::]:443 ssl http2;
listen 443 ssl http2;
}