Browse Source

added redirect for webchat

dominik 1 year ago
parent
commit
089bad5c84
4 changed files with 24 additions and 2 deletions
  1. 2 1
      data/conf.d/43-http.yml
  2. 5 1
      data/conf.d/60-modules.yml
  3. 16 0
      data/www/index.html
  4. 1 0
      docker-compose.yml

+ 2 - 1
data/conf.d/43-http.yml

@@ -17,10 +17,11 @@ listen:
     port: 80
     ip: "::" #listen to v4 and v6
     module: ejabberd_http
-    tls: false
+    tls: false #disabled as handeld by the reverse-proxy
 #    tls: true 
 #    ciphers: 'TLS_CIPHERS'
 #    protocol_options: 'TLS_OPTIONS'
     request_handlers:
       "/conversejs": mod_conversejs
+      "/": mod_http_fileserver
 

+ 5 - 1
data/conf.d/60-modules.yml

@@ -33,7 +33,11 @@ modules:
   mod_fail2ban: {}
 #  mod_stun_disco: {} #--> see 50-stun-turn.yml
 #  mod_http_api: {}
-#  mod_http_fileserver:{} 
+  mod_http_fileserver:
+    default_content_type: "text/html"
+    docroot: "/var/www/"
+    directory_indices:
+      - "index.html"
   ##  docroot: "/var/www"
   ##  accesslog: "/home/ejabberd/logs/access.log"
   #mod_http_api: {}

+ 16 - 0
data/www/index.html

@@ -0,0 +1,16 @@
+<html>
+
+<head>
+<meta http-equiv="refresh" content="0; url=/conversejs/" />
+</head>
+
+<body>
+  <p>
+    <a href="/conversejs/">
+      Webchat
+    </a>
+  </p>
+</body>
+
+</html>
+

+ 1 - 0
docker-compose.yml

@@ -37,6 +37,7 @@ services:
       - ./data/database/:/home/ejabberd/database/
       - ./data/backup/:/home/ejabberd/backup/
       - ./data/upload/:/home/ejabberd/upload/
+      - ./data/www:/var/www/
       - /opt/docker/reverse-proxy/data/certs/${HOSTNAME}:/etc/ssl/ejabberd:ro
 
     environment: