-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfull_Upload.conf
More file actions
89 lines (72 loc) · 1.93 KB
/
full_Upload.conf
File metadata and controls
89 lines (72 loc) · 1.93 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# -----------------------------------------------------------------
# Full configuration file for testing parser and validation
# -----------------------------------------------------------------
server {
listen 8080;
server_name localhost;
root www;
# Directory for uploads (required)
upload_path www/uploads;
# Default error pages
error_page 400 www/errors/400.html;
error_page 403 www/errors/403.html;
error_page 404 www/errors/404.html;
error_page 413 www/errors/413.html;
error_page 500 www/errors/500.html;
# Maximum allowed body size in bytes
client_max_body_size 100000000;
# Index files to look for
index index.html;
# CGI configuration
cgi_path /usr/bin/php-cgi;
cgi_extension .php;
# ---------------------------------
# Locations
# ---------------------------------
# Home page
location / {
root www/main;
index index.html;
upload_path www/main;
methods GET;
}
# page upload
location /upload {
root www/main;
index upload.html;
methods GET;
}
# Endpoint upload
location /uploads {
#root ./uploads;
root www/uploads;
upload_path uploads;
methods POST;
}
# CGI handling
location /cgi-bin {
root www/cgi;
upload_path uploads/cgi;
cgi_path /usr/bin/python3;
cgi_extension .py;
methods GET POST;
}
}
# -----------------------------------------------------------------
# Second server block for multi-server testing
# -----------------------------------------------------------------
server {
listen 8081;
server_name *;
root www;
upload_path www/uploads;
error_page 400 www/errors/400.html;
error_page 404 www/404.html;
index index_testing.html;
location / {
root www;
index index_testing.html;
upload_path www/uploads;
methods GET;
}
}