File tree Expand file tree Collapse file tree 3 files changed +107
-56
lines changed
nginx-oss/etc/nginx/conf.d Expand file tree Collapse file tree 3 files changed +107
-56
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments