-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx-standalone-example.conf
63 lines (52 loc) · 1.87 KB
/
nginx-standalone-example.conf
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
51
52
53
54
55
56
57
58
59
60
61
62
63
worker_processes auto;
pid ./tmp/.nginx/nginx.pid;
error_log ./tmp/.nginx/error.log;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log ./tmp/.nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include mime.types;
default_type application/octet-stream;
client_body_temp_path ./tmp/.nginx/client-body;
proxy_temp_path ./tmp/.nginx/proxy;
fastcgi_temp_path ./tmp/.nginx/fastcgi;
uwsgi_temp_path ./tmp/.nginx/uwsgi;
scgi_temp_path ./tmp/.nginx/scgi;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
charset UTF-8;
root .;
location /tmp {
client_max_body_size 32G; # Max size of an uploaded file
dav_methods PUT DELETE MKCOL; # Enable put, delete, mkcol
create_full_put_path on; # Allow to create intermediate dirs
dav_access user:rw group:rw all:rw; # Permission for new files
min_delete_depth 2; # Delete /tmp itself is not allowed
}
location /tmp/.nginx {
deny all;
}
location /files {
alias .;
index X6XewZMsmreGIxx1lCdp0Yo1X4qHTivW; # disable index.html
autoindex on;
autoindex_exact_size off;
autoindex_format json;
autoindex_localtime on;
}
location /files/tmp/.nginx {
deny all;
}
}
}