-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
50 lines (43 loc) · 1.16 KB
/
Copy pathnginx.conf
File metadata and controls
50 lines (43 loc) · 1.16 KB
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
47
48
49
50
user nginx;
worker_processes auto;
pid /run/nginx.pid;
load_module /usr/lib/nginx/modules/ngx_http_image_filter_module.so;
events {
worker_connections 1024;
use epoll;
multi_accept on;
}
http {
access_log /dev/stdout;
error_log /dev/stdout;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
types_hash_max_size 2048;
client_max_body_size 300m;
keepalive_timeout 0;
include /etc/nginx/mime.types;
default_type application/octet-stream;
index index.html index.htm;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name localhost;
gzip on;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9000;
}
location ~ "^/upload/(?<image>.+)$" {
alias /app/_file/$image;
# image_filter_interlace on;
image_filter_buffer 50M;
}
location ~ "^/upload-lazy/(?<image>.+)$" {
alias /app/_file/$image;
image_filter resize 20 -;
image_filter_jpeg_quality 75;
image_filter_buffer 8M;
}
}
}