forked from Anagamedina/webserv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtester.conf
More file actions
41 lines (38 loc) · 1.25 KB
/
Copy pathtester.conf
File metadata and controls
41 lines (38 loc) · 1.25 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
server {
listen 8080;
host localhost;
server_name localhost;
# ------------------------------------------------------------
# 1. "/" → GET only (enforced by static handler), POST allowed for CGI
# ------------------------------------------------------------
location / {
allow_methods GET;
root YoupiBanane/;
index index.html;
}
location /cgi-bin {
allow_methods POST;
root YoupiBanane/;
cgi .bla YoupiBanane/cgi_tester;
}
# ------------------------------------------------------------
# 3. "/post_body" → POST only, max body 100 bytes
# ------------------------------------------------------------
location /post_body {
allow_methods POST;
client_max_body_size 100;
return 200 "OK";
}
# ------------------------------------------------------------
# 4. "/directory/" → GET only
# root = YoupiBanane
# default file = youpi.bad_extension
# ------------------------------------------------------------
location /directory/ {
allow_methods GET POST;
client_max_body_size 200000000;
root YoupiBanane;
index youpi.bad_extension;
cgi .bla YoupiBanane/cgi_tester;
}
}