Files
homelab/nginx.conf
T
2023-08-14 13:38:13 -07:00

61 lines
1.5 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;
}
}
server {
listen 5000;
location / {
proxy_pass http://localhost:5001;
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;
}
}
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 {
server {
listen 3080;
proxy_pass localhost:33360; # TODO: change to NodePort of api within kubernetes
}
server {
listen 6000 udp;
proxy_pass localhost:33600; # TODO: change to NodePort of udp deployment service
}
server {
listen 6001 udp;
proxy_pass localhost:33600; # TODO: change to NodePort of udp deployment service
}
server {
listen 6002;
proxy_pass localhost:33600; # TODO: change to NodePort of tcp presence deployment service
}
}