From bb976aa6ecc06f676ff93742012ab4cce398c174 Mon Sep 17 00:00:00 2001 From: alexandredevely <12896316+alexandredevely@users.noreply.github.com> Date: Tue, 10 Oct 2023 12:58:29 +0200 Subject: [PATCH] fix error with RO https://github.com/abcdesktopio/conf/issues/4 --- etc/nginx/sites-enabled/default | 82 +++++++++++++++++++++++++++++---- 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/etc/nginx/sites-enabled/default b/etc/nginx/sites-enabled/default index a4f427e..9f6d507 100644 --- a/etc/nginx/sites-enabled/default +++ b/etc/nginx/sites-enabled/default @@ -1,8 +1,68 @@ -# You may add here your -# server { -# ... -# } -# statements for each of your virtual hosts to this file + +# THIS FILE IS OVERWRITTE BY KUBERNETES CONFIG MAP +# +# LOOK AT +# https://raw.githubusercontent.com/abcdesktopio/conf/main/kubernetes/abcdesktop-3.0.yaml +# https://raw.githubusercontent.com/abcdesktopio/conf/main/kubernetes/abcdesktop-3.1.yaml +# +######## +# --- +# apiVersion: v1 +# kind: ConfigMap +# metadata: +# name: nginx-config +# namespace: abcdesktop +# labels: +# abcdesktop/role: nginx-config +# data: +# default: | +# lua_package_path "/usr/local/share/lua/5.1/?.lua;;"; +# types { +# # Web fonts +# application/font-woff2 woff2; +# application/-font-ttf ttc ttf; +# font/opentype otf; +# } +# server { +# resolver 'kube-dns.kube-system.svc.cluster.local'; +# set $my_speedtest 'speedtest.abcdesktop.svc.cluster.local'; +# set $my_proxy 'pyos.abcdesktop.svc.cluster.local'; +# listen 80; +# server_name _; +# root /var/webModules; +# index index.html index.htm; +# # default abcdesktop.io oc.user tcp port +# set $pulseaudio_http_port 4714; +# set $ws_tcp_bridge_tcp_port 6081; +# set $api_service_tcp_port 8000; +# set $filemanager_bridge_tcp_port 29780; +# set $xterm_tcp_port 29781; +# set $printerfile_service_tcp_port 29782; +# set $file_service_tcp_port 29783; +# set $broadcast_tcp_port 29784; +# set $lync_service_tcp_port 29785; +# set $spawner_service_tcp_port 29786; +# set $janus_service_tcp_port 29787; +# # uncomment to use env var +# # set_by_lua $filemanager_bridge_tcp_port 'return os.getenv("FILEMANAGER_BRIDGE_TCP_PORT")'; +# # set_by_lua $broadcast_tcp_port 'return os.getenv("BROADCAST_SERVICE_TCP_PORT")'; +# # set_by_lua $ws_tcp_bridge_tcp_port 'return os.getenv("WS_TCP_BRIDGE_SERVICE_TCP_PORT")'; +# # set_by_lua $spawner_service_tcp_port 'return os.getenv("SPAWNER_SERVICE_TCP_PORT")'; +# # set_by_lua $xterm_tcp_port 'return os.getenv("XTERM_TCP_PORT")'; +# # set_by_lua $file_service_tcp_port 'return os.getenv("FILE_SERVICE_TCP_PORT")'; +# # set_by_lua $pulseaudio_http_port 'return os.getenv("PULSEAUDIO_HTTP_PORT")'; +# location /nstatus { +# # allow 127.0.0.1; +# # deny all; +# stub_status; +# } +# +# include route.conf; +# } +# --- +# +# +######## ## # You should look at the following URL's in order to grasp a solid understanding @@ -41,10 +101,16 @@ types { server { - resolver 127.0.0.11 ipv6=off; # DNS in docker mode + # replace the default resilver ip addr + # This is a default value + resolver 127.0.1.1 ipv6=off; # DNS in docker mode - set $my_speedtest 'speedtest.abcdesktop.svc.cluster.local.'; - set $my_proxy 'pyos.abcdesktop.svc.cluster.local.'; + # replace my_speedtest by the speedtest FQDN + # replace my_proxy by the pyos FQDN + # This is a default value + set $my_speedtest 'speedtest.abcdesktop.svc.cluster.local'; + # This is a default value + set $my_proxy 'pyos.abcdesktop.svc.cluster.local'; listen 80 default_server; # listen [::]:80 default_server ipv6only=on;