-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebserv.conf
68 lines (68 loc) · 1.2 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
server {
listen 0.0.0.0:9000;
location / {
root .;
index index.html;
autoindex on;
}
location /test {
allowed_methods "GET|PUT";
root html;
index index.html;
autoindex on;
}
location /cgi {
root html/example;
index index.html;
cgi $self;
cgi_ext .cgi;
}
location /py {
root html/example;
index index.html;
cgi python3 $self;
cgi_ext .py;
}
location /redir {
redirect_url https://42wolfsburg.de;
}
location /307 {
redirect_url 307 https://42.fr;
}
}
server {
listen 0.0.0.0:9000;
server_names 1.localhost 2.localhost;
location / {
root html;
index index.html;
autoindex on;
}
}
server {
listen 0.0.0.0:9000;
server_names abc.localhost 3.localhost;
location / {
root html/example;
index index.html;
autoindex on;
}
}
server {
listen 0.0.0.0:9001;
error_page 400 406 html/example/index.html;
error_page 404 html/config.html;
client_max_body_size 5MB;
location / {
root html/example;
index index.html;
static_dir html;
autoindex off;
}
location /test \.(txt|sh)$ {
root html/example;
index index.html;
static_dir pages;
autoindex off;
}
}