8000 nginx lab 업데이트 · f5minions/nginx-basics-workshops@81ddb6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 81ddb6a

Browse files
committed
nginx lab 업데이트
1 parent eb590b5 commit 81ddb6a

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
server {
2+
3+
listen 80 default_server; # Listening on port 80 on all IP addresses on this machine
4+
5+
server_name www.example.com; # Set hostname to match in request
6+
7+
access_log /var/log/nginx/www.example.com.log main;
8+
error_log /var/log/nginx/www.example.com_error.log info;
9+
10+
location / {
11+
12+
default_type text/html; # Set type to avoid browser downloading to file
13+
return 200 "You have reached www.example.com, location /\n";
14+
15+
}
16+
17+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
server {
2+
3+
listen 80 default_server; # Listening on port 80 on all IP addresses on this machine
4+
5+
server_name www2.example.com; # Set hostname to match in request
6+
7+
access_log /var/log/nginx/www2.example.com.log main;
8+
error_log /var/log/nginx/www2.example.com_error.log info;
9+
10+
location / {
11+
12+
default_type text/html;
13+
return 200 "Congrats, you have reached www2.example.com, the base path /\n";
14+
15+
}
16+
}

0 commit comments

Comments
 (0)
0