From 37531ca37ced9da83cd30c27e30c75e74c90675f Mon Sep 17 00:00:00 2001 From: Arnaud Fornerot Date: Mon, 6 Dec 2021 14:46:37 +0100 Subject: [PATCH 1/3] conf proxy wss --- tmpl/nineschool-apache.conf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tmpl/nineschool-apache.conf b/tmpl/nineschool-apache.conf index 3c05d8a..6bb0a42 100644 --- a/tmpl/nineschool-apache.conf +++ b/tmpl/nineschool-apache.conf @@ -6,4 +6,16 @@ Alias /nineschool /var/www/html/nineschool/public Allow from All Options Indexes FollowSymLinks MultiViews php_admin_flag allow_url_fopen On - \ No newline at end of file + + +# Pour activer un serveur websocket sur l'application +# Attention choisir un port libre dans +# 5546 = nineskeletor +# 5556 = ninegate +# 5566 = nineboard +# 5576 = nineschool +# 5586 = ninesurvey +# 5587 = ninetraining +# 5596 = janus +ProxyPass "/wssnineschool" "ws://0.0.0.0:5576" retry=0 keepalive=On +ProxyPassReverse "/wssnineschool" "ws://0.0.0.0:5576" retry=0 \ No newline at end of file From ed36a30dfe4cec4ebccbf7417b3af2ec80c635e9 Mon Sep 17 00:00:00 2001 From: Arnaud Fornerot Date: Mon, 6 Dec 2021 16:13:13 +0100 Subject: [PATCH 2/3] configuration reverse proxy wss --- dicos/90_nineschool.xml | 16 +++++++++++++++- tmpl/nineschool-nginx.conf | 6 ++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tmpl/nineschool-nginx.conf diff --git a/dicos/90_nineschool.xml b/dicos/90_nineschool.xml index 219814c..6c4e0a3 100644 --- a/dicos/90_nineschool.xml +++ b/dicos/90_nineschool.xml @@ -2,6 +2,7 @@ + @@ -22,7 +23,7 @@ - + oui @@ -76,9 +77,21 @@ non nineschool + nineschool_nginx nineschool + + + non + nineschool_nginx + + + + + oui + nineboard_nginx + @@ -108,6 +121,7 @@ nineschool_dbpass nineschool + nineschool_nginx nineschool diff --git a/tmpl/nineschool-nginx.conf b/tmpl/nineschool-nginx.conf new file mode 100644 index 0000000..4860252 --- /dev/null +++ b/tmpl/nineschool-nginx.conf @@ -0,0 +1,6 @@ + location /wssnineschool { + proxy_pass https://%%container_ip_web; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } \ No newline at end of file From f298298fb48e83ec2f8a0ef541642bb6fa51e76d Mon Sep 17 00:00:00 2001 From: Arnaud Fornerot Date: Mon, 6 Dec 2021 17:03:32 +0100 Subject: [PATCH 3/3] secretkey for amonecole --- tmpl/nineschool-env.local | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tmpl/nineschool-env.local b/tmpl/nineschool-env.local index dab03a1..479fa89 100644 --- a/tmpl/nineschool-env.local +++ b/tmpl/nineschool-env.local @@ -1,6 +1,7 @@ # SYMFONY APP_ENV=PROD -APP_SECRET=%%pwdreader("","/var/www/html/nineschool/.key") +%set keyfile = %%getVar('container_path_web','') + '/var/www/html/nineschool/.key' +APP_SECRET=%%pwdreader("",%%keyfile) #TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 #TRUSTED_HOSTS='^(localhost|example\.com)$'