-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd7495c
commit a5b9917
Showing
1 changed file
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
|
||
# 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 $signalling_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 | ||
# of Nginx configuration files in order to fully unleash the power of Nginx. | ||
# http://wiki.nginx.org/Pitfalls | ||
# http://wiki.nginx.org/QuickStart | ||
# http://wiki.nginx.org/Configuration | ||
# | ||
# Generally, you will want to move this file somewhere, and start with a clean | ||
# file but keep this around for reference. Or just disable in sites-enabled. | ||
# | ||
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. | ||
## | ||
|
||
lua_package_path "/usr/local/share/lua/5.1/?.lua;;"; | ||
|
||
# this runs before forking out nginx worker processea | ||
# init_worker_by_lua_file init.targetmap.lua | ||
|
||
|
||
|
||
types { | ||
# Web fonts | ||
application/font-woff2 woff2; | ||
|
||
# Browsers usually ignore the font media types and simply sniff | ||
# the bytes to figure out the font type. | ||
# https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern | ||
# | ||
# However, Blink and WebKit based browsers will show a warning | ||
# in the console if the following font types are served with any | ||
# other media types. | ||
application/-font-ttf ttc ttf; | ||
font/opentype otf; | ||
} | ||
|
||
server { | ||
|
||
# replace the default resilver ip addr | ||
# This is a default value | ||
resolver 127.0.1.1 ipv6=off; # DNS in docker mode | ||
|
||
listen 80 default_server; | ||
# listen [::]:80 default_server ipv6only=on; | ||
|
||
root /var/webModules; | ||
index index.html index.htm; | ||
|
||
# default desktop oc.user tcp port | ||
set $pulseaudio_http_port 4714; | ||
set $ws_tcp_bridge_tcp_port 6081; | ||
set $api_service_tcp_port 8000; | ||
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 $signalling_service_tcp_port 29787; | ||
|
||
# use env var | ||
set_by_lua $my_speedtest 'return os.getenv("SPEEDTEST_FQDN")'; | ||
set_by_lua $my_proxy 'return os.getenv("PYOS_FQDN")'; | ||
set_by_lua $my_console 'return os.getenv("CONSOLE_FQDN")'; | ||
set_by_lua $my_website 'return os.getenv("WEBSITE_FQDN")'; | ||
|
||
#add header | ||
add_header X-Frame-Options "SAMEORIGIN"; | ||
add_header X-XSS-Protection "1; mode=block"; | ||
|
||
include route.conf; | ||
} |