10BC0 lab4 업데이트 · f5minions/nginx-basics-workshops@36a405b · GitHub
[go: up one dir, main page]

Skip to content

Commit 36a405b

Browse files
committed
lab4 업데이트
1 parent bfbb696 commit 36a405b

File tree

3 files changed

+107
-56
lines changed

3 files changed

+107
-56
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# cafe.example.com HTTP
2+
# NGINX Basic Workshop
3+
# May 2024, Jaehong KIM
4+
#
5+
6+
server {
7+
listen 80; #Listening on port 80 on all IP addresses on this machine
8+
9+
server_name cafe.example.com #Set hostname to match in request
10+
11+
access_log /var/log/nginx/cafe.example.com.log main;
12+
error_log /var/log/nginx/cafe.example.com_error.log info;
13+
14+
location / {
15+
proxy_pass http://nginx_cafe; # Must match the upstream block name
16+
}
17+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# NGINX Basics, OSS Proxy to three upstream NGINX containers
2+
# Chris Akker, Shouvik Dutta - Feb 2024
3+
#
4+
# nginx_cafe servers
5+
6+
upstream nginx_cafe { # Upstream block, the name is "nginx_cafe"
7+
8+
# Load Balancing Algorithms supported by NGINX
9+
# - Round Robin (Default if nothing specified)
10+
# - Least Connections
11+
# - IP Hash
12+
# - Hash (Any generic Hash)
13+
14+
# Uncomment for Least Connections algorithm
15+
# least_conn;
16+
17+
# From Docker-Compose:
18+
server web1:80;
19+
server web2:80;
20+
server web3:80;
21+
22+
#Uncomment for IP Hash persistence
23+
# ip_hash;
24+
25+
# Uncomment for keepalive TCP connections to upstreams
26+
# keepalive 16;
27+
28+
}
29+

0 commit comments

Comments
 (0)
0