-
Notifications
You must be signed in to change notification settings - Fork 1
/
webserv.conf
98 lines (77 loc) · 1.77 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
88
89
90
91
92
93
94
95
96
97
98
# The default server is the first one listed in the conf file,
# unless the default_server parameter explicitly designates a server as default
server {
listen 80;
error_page 404 ./data/error_page/404.html;
error_page 500 ./data/error_page/500.html;
location / {
root ./data/html;
index index.html;
cgi_pass py /usr/bin/python3;
}
location /php {
root ./data/html/php;
index index.php;
client_max_body_size 4;
cgi_pass php ./data/cgi/php-cgi;
}
location /session {
root ./data/html/session;
index page.php;
cgi_pass php ./data/cgi/php-cgi;
}
location /upload {
root ./data/html/upload;
index index.html;
cgi_pass py /usr/bin/python3;
accepted_methods GET POST;
}
location /upload/uploads {
root ./data/html/upload/uploads;
directory_listing on;
}
}
server {
listen 4242;
location / {
client_max_body_size 1;
root ./data/html/4242/;
index index.txt;
}
}
server {
listen 80;
server_name example.com;
location / {
root ./data/html/example.com;
index index.txt;
accepted_methods GET;
}
}
server {
listen 80;
server_name test.com;
location / {
client_max_body_size 1;
root ./data/html/test.com/;
index index.txt;
}
}
# server {
# listen 80;
# server_name test.com;
# location / {
# client_max_body_size 1;
# root ./data/html/test.com/;
# index index.txt;
# }
# }
# server {
# listen 127.0.0.1:80;
# server_name testtest.com;
# location / {
# client_max_body_size 1;
# root ./data/html/test.com/;
# index index.txt;
# }
# }