-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.config
228 lines (177 loc) · 3.89 KB
/
default.config
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
error_log info;
http {
server {
listen 8080;
listen 8081;
server_name example.com www.example.com localhost;
client_max_body_size 1000000000;
root www/website;
index index.html index.htm;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
location / {
limit_except GET;
autoindex on;
}
location /some-images/ {
autoindex on;
}
location /with-cgi {
cgi .py /usr/bin/python3;
}
location /upload/ {
limit_except POST;
upload_store ./www/website/uploads;
}
location /dummyfile {
}
location /old-page {
return 301 /new-page;
}
}
server {
listen 8082;
server_name example.com www.example.com localhost;
client_max_body_size 1000000000;
root www/blog;
index index.html index.htm;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
location / {
limit_except GET;
}
location /index.html {
}
location /about.html {
}
location /joe-caione-qO-PIF84Vxg-unsplash.jpg {
}
location /mikhail-vasilyev-IFxjDdqK_0U-unsplash.jpg {
}
}
server {
listen 8083;
server_name example.com www.example.com localhost;
client_max_body_size 1000000000;
root www/coffee-shop;
index index.html index.htm;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
location / {
limit_except GET;
autoindex off;
}
location /index.html {
}
location /fry.png {
}
location /styles.css {
}
}
server {
listen 8084;
server_name example.com www.example.com localhost;
client_max_body_size 1000000000;
root www/js-calculator;
index index.html index.htm;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
location /404.html {
}
location / {
limit_except GET;
autoindex off;
}
location /index.html {
}
location /calculator.js {
}
location /styles.css {
}
}
server {
listen 8085;
server_name dog.com www.dog.com localhost;
client_max_body_size 1000000000;
root www/simple-api;
index index.html index.htm;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
location / {
limit_except GET;
}
location /index.html {
}
location /dog.js {
}
location /styles.css {
}
}
server {
listen 8086;
server_name dad.com www.dad.com localhost;
client_max_body_size 10000;
root www/dad-jokes-api;
index index.html index.htm;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
location / {
limit_except GET;
}
location /index.html {
}
location /joke.js {
}
location /styles.css {
}
}
# TODO: specify IP in some server
server {
listen 8087;
server_name insta.com www.insta.com localhost;
client_max_body_size 3145728;
root www/instagram-clone;
index index.html index.htm;
error_page 404 /404.html;
error_page 403 /403.html;
error_page 500 502 503 504 /50x.html;
location / {
limit_except GET;
return 301 /home.py;
}
location /cgi/cookie_check_cgi {
cgi ./www/instagram-clone/cgi/cookie_check_cgi;
}
location /home.py {
# cgi .py /Users/sebasnadu/.pyenv/shims/python;
cgi .py /usr/bin/python3;
# cgi .py /sgoinfre/goinfre/Perso/denizozd/homebrew/bin/python3;
# cgi .py /sgoinfre/goinfre/Perso/jmigoya-/homebrew/bin/python3;
}
location /css {
}
location /cgi/login_cgi {
cgi ./www/instagram-clone/cgi/login_cgi;
}
location /cgi {
# cgi .py /Users/sebasnadu/.pyenv/shims/python;
cgi .py /usr/bin/python3;
# cgi .py /sgoinfre/goinfre/Perso/denizozd/homebrew/bin/python3;
upload_store ./www/instagram-clone/upload;
# return /home.py;
}
# Define a location that uses CGI scripts.
location /cgi/delete_cgi {
cgi ./www/instagram-clone/cgi/delete_cgi;
}
location /upload {
limit_except POST GET DELETE;
}
}
}