-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.conf
60 lines (53 loc) · 1.24 KB
/
default.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
http {
default_type application/octet-stream;
types {
text/html html htm shtml bad_extension bla;
text/css css;
}
server {
listen 4242;
root /Users/yamkim/42Cursus/webserv/www/html;
index index.html pycgi.pya index.phpa hihi.htmla;
server_name webserv.0.1;
keepalive_timeout 2;
client_max_body_size 1000000;
autoindex on;
error_page 404 40x.html;
location / {
index index.html;
autoindex on;
}
location /php {
index phpinfo.php;
allowed_method GET;
error_page 404 403 /static_html/40x.html;
autoindex off;
}
location /static_html {
index index.html;
error_page 404 /40x.html;
autoindex off;
}
location /etc/foo {
error_page 404 40x.html;
index index.html;
autoindex on;
}
location /static_html/etc/data {
index data.html;
error_page 404 40x.html;
autoindex off;
}
location /etc/bar {
index hihi.html index.html index.php;
autoindex off;
return 301 http://localhost:4242/js/scripts.js;
}
location .py$ {
cgi_pass /usr/bin/python3;
}
location .php$ {
cgi_pass /Users/yamkim/42Cursus/webserv/php-bin/php-cgi;
}
}
}