-
Notifications
You must be signed in to change notification settings - Fork 2
/
webserv.conf
87 lines (78 loc) · 1.55 KB
/
webserv.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
types {
text/html html;
text/css css;
application/javascript js;
image/jpeg jpg;
image/png png;
image/gif gif;
application/pdf pdf;
text/plain txt;
application/xml xml;
application/json json;
video/mp4 mp4;
audio/mpeg mp3;
}
server {
server_name webserv.com;
listen 0.0.0.0:8080;
max_body_size 1000000;
# max_connect 100;
# max_header 4000;
root /www;
default_file index.html;
upload_dir /data/uploads;
error_pages {
400 /error_pages/400.html;
403 /error_pages/403.html;
404 /error_pages/404.html;
405 /error_pages/405.html;
408 /error_pages/408.html;
418 /error_pages/418.html;
413 /error_pages/413.html;
500 /error_pages/500.html;
}
# access_log /logs/access.log;
# error_log /logs/error.log;
location / {
root /static;
allowed_methods GET POST DELETE;
}
location /images/ {
root /data;
lsdir true;
}
location /fruits/ {
root /static;
cgi_ext .py;
allowed_methods GET POST DELETE;
}
location /obst/ {
redirection /fruits/;
}
location /vegetables/ {
root /static;
default_file veggies.html;
allowed_methods GET POST DELETE;
}
}
server {
server_name server.com;
listen 0.0.0.0:8989;
max_body_size 100000;
# max_connect 100;
# max_header 4000;
root /www;
default_file index.html;
upload_dir /data/uploads;
# access_log /logs/access.log;
# error_log /logs/error.log;
location / {
root /static;
allowed_methods GET POST DELETE;
}
location /vegetables/ {
root /static;
default_file veggies.html;
allowed_methods GET POST DELETE;
}
}