forked from oulhafiane/HTTP-Web-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebserv.conf
More file actions
68 lines (62 loc) · 1.73 KB
/
Copy pathwebserv.conf
File metadata and controls
68 lines (62 loc) · 1.73 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
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
debug false;
error_400 errors/400.html;
error_401 errors/401.html;
error_403 errors/403.html;
error_404 errors/404.html;
error_405 errors/405.html;
error_500 errors/500.html;
http {
root /var/www/html;
server { # simple reverse-proxy
listen 127.0.0.1:6968;
server_name domain2.com www.domain2.com;
root /Users/akarafi/Desktop/HTTP-Web-Server;
directory_listing on;
# serve static files
location /static/ {
root /Users/akarafi/Desktop/HTTP-Web-Server;
expires 30d;
}
location /errors/ {
root /Users/akarafi/Desktop/HTTP-Web-Server/errors;
}
# pass requests for dynamic content to rails/turbogears/zope, et al
location / {
index index.php;
fastcgi_pass /Users/akarafi/goinfre/.brew/bin/php-cgi;
# allowed_methods POST;
root /Users/akarafi/Desktop/HTTP-Web-Server;
proxy_pass http://127.0.0.1:6971;
}
location /redirect/ {
redirect /;
}
location /upload/ {
upload_pass /tmp/upload;
}
location ~ .*\.php {
fastcgi_pass /Users/akarafi/goinfre/.brew/bin/php-cgi;
}
}
server { # php/fastcgi
listen 127.0.0.1:9091;
server_name domain1.com www.domain1.com;
access_log logs/domain1.access.log main;
root /Users/akarafi/Desktop/HTTP-Web-Server;
location /cgi/ {
root /Users/akarafi/Desktop/HTTP-Web-Server;
fastcgi_pass /Users/akarafi/goinfre/.brew/bin/php-cgi;
}
location /py_cgi/ {
index index.py;
fastcgi_pass /usr/local/bin/python3;
}
}
server { # simple load balancing
listen 127.0.0.1:6968;
server_name domain3.com;
location / {
root /root;
}
}
}