-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebserver.conf
More file actions
34 lines (28 loc) · 808 Bytes
/
webserver.conf
File metadata and controls
34 lines (28 loc) · 808 Bytes
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
http {
server {
listen 8080;
root /Users/peter/Desktop/Personal/project/nginx/loadBalancer/;
# can go to localhost:8080/images
location /images {
# no need to mention /images because the location above will be appended
# go to localhost:8080/images/something.jpg
root /Users/peter/Desktop/;
}
# '~' to specify regular expression
# '$' to specify end with that
# location ~ .jpg$ {
# return 403;
# }
}
server {
listen 8888;
# redirect to the server above
location / {
proxy_pass http://localhost:8080/;
}
location /img {
proxy_pass http://localhost:8080/images;
}
}
}
events { }