Add new file
This commit is contained in:
parent
8daa636a06
commit
7508056f70
1 changed files with 24 additions and 0 deletions
24
load-balancer.conf
Normal file
24
load-balancer.conf
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
user www-data;
|
||||||
|
worker_processes auto;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
include /etc/nginx/modules-enabled/*.conf;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 768;
|
||||||
|
# multi_accept on;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
http {
|
||||||
|
split_clients "${remote_addr}" $cdnhosts {
|
||||||
|
50% "cdn-node1.domain.tld";
|
||||||
|
50% "cdn-node2.domain.tld0";
|
||||||
|
}
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
listen [::]:8080;
|
||||||
|
location / {
|
||||||
|
return 301 "http://${cdnhosts}${request_uri}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue