93 lines
2.3 KiB
Nginx Configuration File
93 lines
2.3 KiB
Nginx Configuration File
# nginx.conf for a basic web server
|
|
events {}
|
|
|
|
http {
|
|
server {
|
|
listen 8080;
|
|
server_name localhost;
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
}
|
|
}
|
|
|
|
# container registry
|
|
server {
|
|
listen 5000;
|
|
|
|
location / {
|
|
proxy_pass http://registry:5000;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
|
|
# rancher http
|
|
server {
|
|
listen 2000;
|
|
|
|
location / {
|
|
proxy_pass http://rancher:80;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
|
|
# rancher https: the destination container will handle tls
|
|
server {
|
|
listen 2001;
|
|
|
|
location / {
|
|
proxy_pass https://rancher:443;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
|
|
# kubernetes cluster hello world
|
|
server {
|
|
listen 80;
|
|
|
|
location / {
|
|
proxy_pass http://localhost:33360; # TODO: change to NodePort of helloworld within kubernetes
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
}
|
|
|
|
stream {
|
|
# kubernetes cluster api
|
|
server {
|
|
listen 3080;
|
|
proxy_pass localhost:33360; # TODO: change to NodePort of api within kubernetes
|
|
}
|
|
|
|
# k8s audio relay
|
|
server {
|
|
listen 6000 udp;
|
|
proxy_pass localhost:33600; # TODO: change to NodePort of udp deployment service
|
|
}
|
|
|
|
# k8s video relay
|
|
server {
|
|
listen 6001 udp;
|
|
proxy_pass localhost:33600; # TODO: change to NodePort of udp deployment service
|
|
}
|
|
|
|
# k8s presence heartbeat
|
|
server {
|
|
listen 6002;
|
|
proxy_pass localhost:33600; # TODO: change to NodePort of tcp presence deployment service
|
|
}
|
|
}
|